updated on Wed Jan 18 08:00:29 UTC 2012
[aur-mirror.git] / keytouch / keytouch.daemon
blobd705b3dfc0974291eeb3fc8e09170c68c7fdfb2d
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 PID=$(pidof -o %PPID /usr/bin/keytouch-acpid)
7 case "$1" in
8 start)
9 stat_busy "Starting keyTouch Daemon"
10 /usr/bin/keytouch-init
11 if [ -z "$PID" ]; then
12 /usr/bin/keytouch-acpid &> /dev/null &
14 if [ $? -gt 0 ]; then
15 stat_fail
16 else
17 add_daemon keytouch
18 stat_done
21 stop)
22 stat_busy "Stopping keyTouch Daemon"
23 [ ! -z "$PID" ] && kill $PID &>/dev/null
24 if [ $? -gt 0 ]; then
25 stat_fail
26 else
27 rm_daemon keytouch
28 stat_done
31 restart)
32 $0 stop
33 $0 start
36 echo "usage: $0 {start|stop|restart}"
37 esac
38 exit 0