MvL Posted September 13, 2010 Share Posted September 13, 2010 Hi, I used this script (from the wiki) to put my unRAID server to sleep. #!/bin/bash drives="/dev/sda /dev/sdb" timeout=5 count=5 while [ 1 ] do hdparm -C $drives | grep -q active if [ $? -eq 1 ] then count=$[$count-1] else count=$timeout fi if [ $count -le 0 ] then # Do pre-sleep activities sleep 5 # Go to sleep echo 3 > /proc/acpi/sleep # Do post-sleep activities # Force NIC into gigabit mode # (might be needed forgets about gigabit when it wakes up) ethtool -s eth0 speed 1000 # Force a DHCP renewal (shouldn't be used for static-ip boxes) /sbin/dhcpcd -n sleep 5 count=$timeout fi # Wait a minute echo COUNT $count sleep 60 done is it possible to disable this script at certain hours? So the unRAID server stays awake between 6.00 -10.00pm. Link to comment
chanders Posted September 13, 2010 Share Posted September 13, 2010 There is another script that does just that and more. See here http://lime-technology.com/forum/index.php?topic=3657.msg70854#msg70854 Link to comment
MvL Posted September 14, 2010 Author Share Posted September 14, 2010 Thanks chanders for pointing me in the right direction! Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.