Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- #Mac OS X Yosemite: Turn wifi OFF then ON if ping dns.yandex fails
- if /sbin/ping -c 5 77.88.8.8 > /dev/null
- then
- /bin/echo Good > /dev/null
- else
- /usr/sbin/networksetup -setairportpower en1 off
- /bin/sleep 10
- /usr/sbin/networksetup -setairportpower en1 on
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement