WOL startup script?
My NAS powers off every-night to save electricity thanks to a little script I created (see: Advanced Shutdown Script - Powersaving).
But now every-morning, before I power on my desktop I need to boot up my NAS 1st :(, and I am lazy, so the energy exerted to push the power button on my NAS box can be better used else where :p So I created a little script that will wake up my NAS box and mount the share(s): Code:
#!/bin/sh So I put this script in /etc/init.d/ and ran 'update-rc.d wake-NAS.sh defaults' and rebooted, and it worked :D However, there are two problems:
If anyone knows of a better way of going about this, I am all ears |
For issue 1
Code:
if [ $# -ne "0" ]; then For issue 2, look in the directories /etc/init.d/rc[1-5].d (or is in /etc/rc[1-5].d on Ubuntu, I forget) and you'll probably find symbolic links to your wake-NAS.sh script. One link will have a name starting with S and the other with K. Delete the one starting with K as that's the one that will be run on shutdown. It's something like that anyway, I don't have a Ubuntu install to check specifics on. |
All times are GMT -5. The time now is 02:25 PM. |