5
# Required-Start: $local_fs
6
# Required-Stop: $local_fs
7
# Should-Start: $remote_fs
8
# Should-Stop: $remote_fs
9
# Default-Start: 2 3 4 5
11
# Short-Description: load deamon for Logitech G15 keyboard lcd display
12
# Description: load deamon for Logitech G15 keyboard lcd display
16
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
17
DAEMON=/usr/sbin/g15daemon
21
test -x $DAEMON || exit 0
23
# Include g15daemon defaults if available
24
if [ -f /etc/default/g15daemon ] ; then
25
. /etc/default/g15daemon
28
if [ "$SWITCH_KEY" = "L1" ]; then
29
DAEMON_OPTS="-s $DAEMON_OPTS"
36
echo -n "Starting $DESC: "
37
start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
38
--exec $DAEMON -- $DAEMON_OPTS
42
echo -n "Stopping $DESC: "
44
start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
50
# If the daemon can reload its config files on the fly
51
# for example by sending it SIGHUP, do it here.
53
# If the daemon responds to changes in its config file
54
# directly anyway, make this a do-nothing entry.
56
# echo "Reloading $DESC configuration files."
57
# start-stop-daemon --stop --signal 1 --quiet --pidfile \
58
# /var/run/$NAME.pid --exec $DAEMON
62
# If the "reload" option is implemented, move the "force-reload"
63
# option to the "reload" entry above. If not, "force-reload" is
64
# just the same as "restart" except that it does nothing if the
65
# daemon isn't already running.
66
# check wether $DAEMON is running. If so, restart
67
start-stop-daemon --stop --test --quiet --pidfile \
68
/var/run/$NAME.pid --exec $DAEMON \
73
echo -n "Restarting $DESC: "
74
start-stop-daemon --stop --quiet --pidfile \
75
/var/run/$NAME.pid --exec $DAEMON
77
start-stop-daemon --start --quiet --pidfile \
78
/var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
83
# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
84
echo "Usage: $N {start|stop|restart|force-reload}" >&2