3 [ -f /etc
/conf.d
/hdapsd
] && .
/etc
/conf.d
/hdapsd
8 PIDFILE
=/var
/run
/hdapsd.pid
9 PID
=`cat $PIDFILE 2> /dev/null`
13 stat_busy
"Starting hdapsd"
15 ## The daemon will try to autoload the kernel module
16 #if [ ! -d /sys/devices/platform/hdaps ]; then
18 # echo "You need to load the hdaps kernel module."
22 ## Set up options to the hdapsd daemon
23 HDAPSD_OPTS
="-bp -d ${DEVICE:-sda}"
24 [ ! -z "$SENSITIVITY" ] && HDAPSD_OPTS
="$HDAPSD_OPTS -s $SENSITIVITY"
25 [ "$ADAPTIVE" = "yes" ] && HDAPSD_OPTS
="$HDAPSD_OPTS -a"
26 [ "$SYSLOG" = "yes" ] && HDAPSD_OPTS
="$HDAPSD_OPTS -l"
27 [ "$FORCE" = "yes" ] && HDAPSD_OPTS
="$HDAPSD_OPTS -f"
28 [ -z "$PID" ] && /usr
/sbin
/hdapsd
$HDAPSD_OPTS
37 stat_busy
"Stopping hdapsd"
38 [ ! -z "$PID" ] && kill $PID &> /dev
/null
52 echo "usage: $0 {start|stop|restart}"