diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /app-misc/actkbd/files/actkbd.initd |
reinit the tree, so we can have metadata
Diffstat (limited to 'app-misc/actkbd/files/actkbd.initd')
-rw-r--r-- | app-misc/actkbd/files/actkbd.initd | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/app-misc/actkbd/files/actkbd.initd b/app-misc/actkbd/files/actkbd.initd new file mode 100644 index 000000000000..bb03870adb2f --- /dev/null +++ b/app-misc/actkbd/files/actkbd.initd @@ -0,0 +1,31 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +checkconfig() { + if [ ! -f ${CONFIG} ] ; then + eerror "Config file \"${CONFIG}\" does not exist. Create it prior launching the daemon." + return 1 + fi + if [ ! -c ${EVENT_DEVICE} ] ; then + eerror "Device \"${EVENT_DEVICE}\" is not valid pointer to input provider." + return 1 + fi +} + +depend() { + before acpid +} + +start() { + checkconfig || return 1 + ebegin "Starting actkbd" + start-stop-daemon --start --quiet --pidfile ${PIDFILE} --exec /usr/bin/actkbd -- -c "${CONFIG}" -D -q -x -l -p "${PIDFILE}" -d "${EVENT_DEVICE}" + eend $? +} + +stop() { + ebegin "Stopping actkbd" + start-stop-daemon --stop --quiet --pidfile ${PIDFILE} --exec /usr/bin/actkbd + eend $? +} |