Skip to content

Instantly share code, notes, and snippets.

@stevejenkins
Created December 4, 2012 17:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save stevejenkins/4206793 to your computer and use it in GitHub Desktop.
Save stevejenkins/4206793 to your computer and use it in GitHub Desktop.
Power Cycle Modem (Outlet 2) and Router (Outlet 3) on BayTech RPC unit
#!/usr/bin/php -q
<?
print("open 192.168.1.200\n");
sleep(2);
print("username\r");
sleep(2);
print("password\r");
sleep(2);
print("REBOOT 2\r");
sleep(2);
print("Y\r");
sleep(15);
print("REBOOT 3\r");
sleep(2);
print("Y\r");
sleep(15);
print("LOGOUT\r");
sleep(2);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment