updated on Thu Jan 19 00:16:31 UTC 2012
[aur-mirror.git] / fsfn-svn / fsfn.rc.d
blob7e9e5c3a1034d35ed60518064fb8b016008548ec
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 case "$1" in
7 start)
8 stat_busy "Starting Vaio Laptop Hotkey Handler"
9 /usr/bin/fsfn &> /dev/null
10 if [ $? -ne 0 ]; then
11 stat_fail
12 else
13 add_daemon fsfn
14 stat_done
17 stop)
18 stat_busy "Stopping Vaio Laptop Hotkey Handler"
19 PID=`cat /var/run/fsfn.pid`
20 [ ! -z "$PID" ] && kill $PID &> /dev/null
21 if [ $? -ne 0 ]; then
22 stat_fail
23 else
24 rm_daemon fsfn
25 stat_done
28 restart|force-reload)
29 $0 stop
30 sleep 1
31 $0 start
34 echo "usage: $0 {start|stop|restart|force-reload}"
35 exit 1
37 esac
38 exit 0