Last active
October 16, 2015 14:31
-
-
Save trick77/49bcb6d9597f404beacd to your computer and use it in GitHub Desktop.
Shell script which checks if network is up and wakes a WOL device using wakeonlan
This file contains hidden or 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
#!/bin/sh | |
. /etc/rc.common | |
CheckForNetwork | |
while [ "${NETWORKUP}" != "-YES-" ] | |
do | |
sleep 1 | |
NETWORKUP= | |
CheckForNetwork | |
done | |
/usr/local/bin/wakeonlan 00:08:9B:C5:BD:21 #<-- Enter NAS MAC address here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment