Created
September 12, 2011 07:16
-
-
Save mechairoi/1210740 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use List::Util qw(first); | |
while(1){ | |
if (first { /\Q100.0% packet loss\E/ } `ping -W 1 -c 3 192.168.0.1`) { | |
`osascript ~/config/bin/toggle-air-mac.scpt`; | |
`osascript ~/config/bin/toggle-air-mac.scpt`; | |
} | |
sleep(10); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment