29 lines
346 B
Bash
29 lines
346 B
Bash
#!/bin/sh
|
|
#
|
|
# /etc/rc.d/vsftpd: start/stop vsftpd daemon
|
|
#
|
|
|
|
CRT=/etc/ssl/certs/vsftpd.pem
|
|
|
|
case $1 in
|
|
start)
|
|
if [ ! -s $CRT ]; then
|
|
/usr/bin/mksslcert $CRT $CRT
|
|
fi
|
|
setsid /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
|