2012-08-11 09:18:32 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
start)
|
2015-10-03 23:29:57 +02:00
|
|
|
printf "Starting acpid: "
|
2012-08-11 09:18:32 +02:00
|
|
|
start-stop-daemon -S -q -m -b -p /var/run/acpid.pid --exec /usr/sbin/acpid -- -n
|
2014-10-26 18:41:43 +01:00
|
|
|
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
2012-08-11 09:18:32 +02:00
|
|
|
;;
|
|
|
|
stop)
|
2015-10-03 23:29:57 +02:00
|
|
|
printf "Stopping acpid: "
|
2012-08-11 09:18:32 +02:00
|
|
|
start-stop-daemon -K -q -p /var/run/acpid.pid
|
2014-10-26 18:41:43 +01:00
|
|
|
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
2012-08-11 09:18:32 +02:00
|
|
|
;;
|
|
|
|
restart)
|
|
|
|
"$0" stop
|
|
|
|
sleep 1
|
|
|
|
"$0" start
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Usage: $0 {start|stop|restart}"
|
|
|
|
;;
|
|
|
|
esac
|