Wake up diskstation

I am using a Synology DS216play NAS which is a perfect solution to store 8 to 16 Gig of pictures. To save energy, the NAS is shut down after 20 minutes of inactivity and woken up by WOL. Broadcasting a magic packet doesn’t seem work on my router but directly addressing the network card is working (the MAC address can be found on the label on the rear).
Wake up can be done by numerous ways, by a standalone program, Applescript/Python, shell/autofs while I finally used the homebrew approach of trick77.

#brew install wakeonlan

. /etc/rc.common
while [ "${NETWORKUP}" != "-YES-" ]
        sleep 1
wakeonlan -i 00:08:9B:C5:BD:21 #<-- enter IP and NAS MAC address here

Just for the records, there is also a solution to shut the station down remotely (at the price of a big security hole)


sshpass -p 'password' ssh root@ shutdown -h now  #<-- enter password and IP here