diff options
Diffstat (limited to 'source/a/acpid/rc.acpid')
-rw-r--r-- | source/a/acpid/rc.acpid | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/source/a/acpid/rc.acpid b/source/a/acpid/rc.acpid new file mode 100644 index 00000000..32486d17 --- /dev/null +++ b/source/a/acpid/rc.acpid @@ -0,0 +1,36 @@ +#!/bin/sh +# Start/stop/restart acpid. + +# Start acpid: +acpid_start() { + if [ -x /usr/sbin/acpid -a -d /proc/acpi ]; then + echo "Starting ACPI daemon: /usr/sbin/acpid" + /usr/sbin/acpid + fi +} + +# Stop acpid: +acpid_stop() { + killall acpid +} + +# Restart acpid: +acpid_restart() { + acpid_stop + sleep 1 + acpid_start +} + +case "$1" in +'start') + acpid_start + ;; +'stop') + acpid_stop + ;; +'restart') + acpid_restart + ;; +*) + echo "usage $0 start|stop|restart" +esac |