opt/pure-ftpd/pure-ftpd
2006-02-25 15:42:56 +00:00

31 lines
426 B
Bash

#!/bin/sh
#
# /etc/rc.d/pure-ftpd: start/stop pure-ftpd daemon
#
CONF=/etc/pure-ftpd.conf
ARGS=$(sed -e '/^\s*$/d' -e '/^#/d' $CONF)
CRT=/etc/ssl/certs/pure-ftpd.pem
case $1 in
start)
if [ ! -s $CRT ]; then
/usr/bin/mksslcert $CRT $CRT
fi
/usr/sbin/pure-ftpd $ARGS
;;
stop)
killall -q /usr/sbin/pure-ftpd
;;
restart)
$0 stop
sleep 2
$0 start
;;
*)
echo "usage: $0 [start|stop|restart]"
;;
esac
# End of file