diff options
Diffstat (limited to 'sys-apps/kuroevtd/files/kuroevtd.initd')
-rw-r--r-- | sys-apps/kuroevtd/files/kuroevtd.initd | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/sys-apps/kuroevtd/files/kuroevtd.initd b/sys-apps/kuroevtd/files/kuroevtd.initd new file mode 100644 index 000000000000..89216bd745b4 --- /dev/null +++ b/sys-apps/kuroevtd/files/kuroevtd.initd @@ -0,0 +1,26 @@ +#!/sbin/runscript + +[ -z "${PIDFILE}" ] && PIDFILE=/var/run/kuroevtd.pid + +depend() { + need kuro-avr-init +} + +start() { + ebegin "Starting Kurobox button events monitor" + start-stop-daemon --start --quiet --exec /usr/sbin/kuroevtd \ + || eend 1 \ + || return 1 + local mypid=$(pidof /usr/sbin/kuroevtd 2>/dev/null) + [ -n "${mypid}" ] && echo ${mypid} > ${PIDFILE} + eend 0 +} + +stop() { + ebegin "Stopping Kurobox button events monitor" + start-stop-daemon --stop --quiet --pidfile=${PIDFILE} + local status=$? + rm -f ${PIDFILE} + eend $status +} + |