opt/vsftpd/vsftpd

30 lines
379 B
Bash

#!/bin/sh
#
# /etc/rc.d/vsftpd: start/stop vsftpd daemon
#
CRT=/etc/ssl/certs/vsftpd.crt
KEY=/etc/ssl/keys/vsftpd.key
case $1 in
start)
if [ ! -s $CRT -o ! -s $KEY ]; then
/usr/bin/mksslcert $KEY $CRT
fi
/usr/sbin/vsftpd
;;
stop)
killall -q /usr/sbin/vsftpd
;;
restart)
$0 stop
sleep 2
$0 start
;;
*)
echo "usage: $0 [start|stop|restart]"
;;
esac
# End of file