updated on Tue Jan 10 04:01:21 UTC 2012
[aur-mirror.git] / pure-ftpd-quota-limits / pure-ftpd
blob0312a5d82a8b7d5ae1b74823bc67ace0390e9fb8
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 PIDFILE="/var/run/pure-ftpd.pid"
7 case "$1" in
8 start)
9 stat_busy "Starting Pure-FTPd"
10 [ ! -f $PIDFILE ] && /usr/sbin/pure-config.pl /etc/pure-ftpd.conf &> /dev/null
11 if [ $? -gt 0 ]; then
12 stat_fail
13 else
14 add_daemon pure-ftpd
15 stat_done
18 stop)
19 stat_busy "Stopping Pure-FTPd"
20 # Just kill the master server, preserve existing connections.
22 [ -f $PIDFILE ] && kill `cat $PIDFILE` &> /dev/null
23 if [ $? -gt 0 ]; then
24 stat_fail
25 else
26 rm_daemon pure-ftpd
27 stat_done
30 restart)
31 $0 stop
32 sleep 1
33 $0 start
36 echo "usage: $0 {start|stop|restart}"
37 esac