Now that I am happy with the scripts I thought I would make them into a daemons. A quick google led to Tony's Cafe blog who described beautifully how to create a debian script for the fancontrol. So I modified his instructions slightly:
Copy /etc/init.d/skeleton to /etc/init.d/fancontrol
Edit /etc/init.d/fancontrol
Change:
NAME=fancontrolAll seemed to be fine except that when I ran /etc/init.d/fancontrol the script would just hang... A bit more googling made me realise that I was no longer running '/usr/local/sbin/fancontrol &' I was running it without the & flag. A quick modification to the start of my fancontol script to have this at the top (take from linuxquestions) :
DAEMON=/usr/local/sbin/$NAME
DAEMON_ARGS=""
if [ "x$1" != "x--" ]; then
$0 -- 1> /dev/null 2> /dev/null &
exit 0 fi
No comments:
Post a Comment