#!/bin/dash
# vsftpd FTP Server
# Description: vsftpd Very Secure FTP Server
#

start() {
	vsftpd
}

stop() {
	killall vsftpd 2> /dev/null
}

is_up() {
	killall -0 vsftpd 2> /dev/null
}

case "$1" in
	start|restart|reload)
		stop
		sleep 1
		start
		;;
		
	stop)
		stop
		;;
				
	status)
		is_up && echo "vsftpd is running." || echo "vsftpd is stopped."
		;;		
		
esac
