2006-02-23 15:26:10 +00:00
|
|
|
#!/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)
|
|
|
|
|
2006-02-25 15:42:56 +00:00
|
|
|
CRT=/etc/ssl/certs/pure-ftpd.pem
|
2006-02-23 15:26:10 +00:00
|
|
|
|
|
|
|
case $1 in
|
|
|
|
start)
|
|
|
|
if [ ! -s $CRT ]; then
|
2006-02-25 15:42:56 +00:00
|
|
|
/usr/bin/mksslcert $CRT $CRT
|
2006-02-23 15:26:10 +00:00
|
|
|
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
|