blob: ef837c2e4848c09e2f4fc134bd1dfb66b6094be5 (
plain)
1 #!/bin/sh
2 #
3 # /etc/rc.d/pure-ftpd: start/stop pure-ftpd daemon
4 #
5
6 CONF=/etc/pure-ftpd.conf
7 ARGS=$(sed -e '/^\s*$/d' -e '/^#/d' $CONF)
8
9 CRT=/etc/ssl/certs/pure-ftpd.pem
10
11 case $1 in
12 start)
13 if [ ! -s $CRT ]; then
14 /usr/bin/mksslcert $CRT $CRT
15 fi
16 /usr/sbin/pure-ftpd $ARGS
17 ;;
18 stop)
19 killall -q /usr/sbin/pure-ftpd
20 ;;
21 restart)
22 $0 stop
23 sleep 2
24 $0 start
25 ;;
26 *)
27 echo "usage: $0 [start|stop|restart]"
28 ;;
29 esac
30
31 # End of file
|