2 # Based on the Debian init.d script from the original hd-idle tarball.
3 # Modified for Arch Linux by Tilman Blumenbach <tilman@ax86.net>.
5 DAEMON
=/usr
/sbin
/hd-idle
9 [ -r /etc
/conf.d
/hd-idle
] && .
/etc
/conf.d
/hd-idle
11 if [ "$START_HD_IDLE" != "true" ] ; then
15 # See if the daemon is there
16 test -x $DAEMON ||
exit 0
21 APP_PID
=`pidof -s "${DAEMON}"`
25 stat_busy
"Starting the hd-idle daemon"
27 [ -z "$APP_PID" ] && $DAEMON $HD_IDLE_OPTS
37 stat_busy
"Stopping the hd-idle daemon"
39 [ -n "$APP_PID" ] && kill "$APP_PID"
49 $0 stop
&& sleep 2 && $0 start
53 echo "Usage: /etc/init.d/hd-idle start/stop/restart/force-reload"