Create a gist now

Instantly share code, notes, and snippets.

@trick77 /naswake.sh
Last active Oct 16, 2015

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