2012-08-11 09:18:32 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
start)
|
|
|
|
echo -n "Starting acpid: "
|
|
|
|
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)
|
|
|
|
echo -n "Stopping acpid: "
|
|
|
|
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
|