You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-misc/actkbd/files/actkbd.initd

33 lines
789 B

#!/sbin/openrc-run
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
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 $?
}