updated on Mon Jan 16 16:00:41 UTC 2012
[aur-mirror.git] / moothy / moothy_rc
blobd6787e2b5fda790bc09b38d2906e4f0c0b3baf59
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 # source application-specific settings
7 [ -f /etc/conf.d/moothy ] && . /etc/conf.d/moothy
9 case "$1" in
10 start)
11 stat_busy "Starting moothy daemon..."
12 /usr/bin/moothy -p /var/run/moothy.pid -t $TIME -d $DEVICES -f $SUSPEND_SCRIPT -w $WINDOWS $E_FLAG &>/dev/null &
13 if [ $? -ne 0 ]; then
14 stat_fail
15 else
16 add_daemon moothy
17 stat_done
20 stop)
21 stat_busy "Stoping moothy daemon..."
22 kill `cat /var/run/moothy.pid` &>/dev/null
23 rm_daemon moothy
24 stat_done
27 echo "usage: $0 {start|stop}"
28 esac
29 exit 0