updated on Sun Jan 22 04:03:10 UTC 2012
[aur-mirror.git] / oftpd / oftpd.rc
blobbc1b34298e29e456d9e3d1824ce578a790184956
1 #!/bin/bash
3 . /etc/conf.d/oftpd
4 . /etc/rc.conf
5 . /etc/rc.d/functions
7 PID=`pidof -o %PPID /usr/bin/oftpd`
8 case "$1" in
9 start)
10 stat_busy "Starting oftpd"
11 [ -z "$PID" ] && /usr/bin/oftpd $OFTPD_ARGS "$OFTPD_USER" "$OFTPD_PATH"
12 if [ $? -gt 0 ]; then
13 stat_fail
14 else
15 add_daemon oftpd
16 stat_done
19 stop)
20 stat_busy "Stopping oftpd"
21 [ ! -z "$PID" ] && kill $PID &> /dev/null
22 if [ $? -gt 0 ]; then
23 stat_fail
24 else
25 rm_daemon oftpd
26 stat_done
29 restart)
30 $0 stop
31 $0 start
34 echo "usage: $0 {start|stop|restart}"
35 esac
37 exit 0