diff options
Diffstat (limited to 'sys-apps/apmd/files/apmd.rc6')
-rw-r--r-- | sys-apps/apmd/files/apmd.rc6 | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/sys-apps/apmd/files/apmd.rc6 b/sys-apps/apmd/files/apmd.rc6 new file mode 100644 index 000000000000..18258c333ff2 --- /dev/null +++ b/sys-apps/apmd/files/apmd.rc6 @@ -0,0 +1,25 @@ +#!/sbin/runscript + +depend() { + need localmount +} + +checkconfig() { + if [ ! -e /proc/apm ] ; then + eerror "APM support has not been compiled into the kernel" + return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting apmd" + start-stop-daemon --start --quiet --exec /usr/sbin/apmd -- -P /etc/apm/apmd_proxy + eend $? +} + +stop() { + ebegin "Stopping apmd" + start-stop-daemon --stop --quiet --pidfile /var/run/apmd.pid + eend $? +} |