xref: /OK3568_Linux_fs/buildroot/package/proftpd/S50proftpd (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1#!/bin/sh
2
3trap "" HUP
4trap "" TERM
5[ ! -d /var/run/proftpd ] && mkdir /var/run/proftpd
6[ ! -f /var/log/wtmp ] && touch /var/log/wtmp
7
8start() {
9	printf "Starting ProFTPD: "
10	/usr/sbin/proftpd
11	if [ $? != 0 ]; then
12		echo "FAILED"
13		exit 1
14	else
15		echo "done"
16	fi
17}
18
19stop() {
20	printf "Stopping ProFTPD: "
21	killall proftpd
22        echo "done"
23}
24
25case "$1" in
26    start)
27	start
28	;;
29
30    stop)
31	stop
32	;;
33
34    restart)
35    	stop
36    	start
37	;;
38
39    *)
40	echo "Usage: /etc/init.d/S50proftpd {start|stop|restart}"
41	exit 1
42	;;
43esac
44
45exit 0
46