Skip to content

Instantly share code, notes, and snippets.

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

Embed
What would you like to do?
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
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.