Shell script which checks if network is up and wakes a WOL device using wakeonlan
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
#!/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