updated on Mon Jan 23 16:10:15 UTC 2012
[aur-mirror.git] / btpd / btpd.rc.d
blob317cf8b0e121dc8c7e5d339cd3b65c93abc1db6e
1 #!/bin/bash
3 # general config
4 . /etc/rc.conf
5 . /etc/conf.d/btpd
6 . /etc/rc.d/functions
8 case "$1" in
9 start)
10 stat_busy "Starting BitTorrent Protocol Daemon"
11 /usr/bin/btpd $BTPD_ARGS &> /dev/null
13 if [ $? -gt 0 ]; then
14 stat_fail
15 else
16 stat_done
19 stop)
20 stat_busy "Stopping BitTorrent Protocol Daemon"
21 /usr/bin/btcli kill &> /dev/null
22 if [ $? -gt 0 ]; then
23 stat_fail
24 else
25 stat_done
28 restart)
29 $0 stop
30 sleep 1
31 $0 start
34 echo "usage: $0 {start|stop|restart}"
35 esac
36 exit 0