python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / triggerhappy / S10triggerhappy
blob3253e910b1b320227041a7e2b2e01b62d5299183
1 #!/bin/sh
3 NAME=thd
4 DAEMON=/usr/sbin/$NAME
5 PIDFILE=/var/run/$NAME.pid
6 DAEMON_ARGS="--daemon --triggers /etc/triggerhappy/triggers.d --socket /var/run/thd.socket --pidfile $PIDFILE --user nobody /dev/input/event*"
8 # Sanity checks
9 test -x $DAEMON || exit 0
11 [ -r /etc/default/triggerhappy ] && . /etc/default/triggerhappy
13 start() {
14 printf "Starting $NAME: "
15 start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS \
16 && echo "OK" || echo "FAIL"
19 stop() {
20 printf "Stopping $NAME: "
21 start-stop-daemon --stop --quiet --pidfile $PIDFILE \
22 && echo "OK" || echo "FAIL"
25 case "$1" in
26 start)
27 start
29 stop)
30 stop
32 restart)
33 stop
34 sleep 1
35 start
38 echo "Usage: $0 {start|stop|restart}"
39 exit 1
40 esac