2014-10-26 18:41:46 +01:00
|
|
|
#!/bin/sh
|
2007-01-14 02:48:49 +01:00
|
|
|
|
2014-10-26 18:41:46 +01:00
|
|
|
trap "" HUP
|
|
|
|
trap "" TERM
|
2007-01-14 02:48:49 +01:00
|
|
|
[ ! -d /var/run/proftpd ] && mkdir /var/run/proftpd
|
|
|
|
[ ! -f /var/log/wtmp ] && touch /var/log/wtmp
|
|
|
|
|
|
|
|
start() {
|
2015-10-03 23:29:57 +02:00
|
|
|
printf "Starting ProFTPD: "
|
2018-04-16 04:29:36 +02:00
|
|
|
/usr/sbin/proftpd
|
2007-01-14 02:48:49 +01:00
|
|
|
if [ $? != 0 ]; then
|
|
|
|
echo "FAILED"
|
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
echo "done"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
2015-10-03 23:29:57 +02:00
|
|
|
printf "Stopping ProFTPD: "
|
2007-01-14 02:48:49 +01:00
|
|
|
killall proftpd
|
|
|
|
echo "done"
|
|
|
|
}
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
start)
|
|
|
|
start
|
|
|
|
;;
|
|
|
|
|
|
|
|
stop)
|
|
|
|
stop
|
|
|
|
;;
|
|
|
|
|
|
|
|
restart)
|
|
|
|
stop
|
|
|
|
start
|
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
|
|
|
echo "Usage: /etc/init.d/S50proftpd {start|stop|restart}"
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
exit 0
|