2014-10-26 18:41:46 +01:00
|
|
|
#!/bin/sh
|
2007-01-14 02:48:49 +01:00
|
|
|
|
|
|
|
DAEMON=/usr/sbin/proftpd
|
2014-10-26 18:41:46 +01:00
|
|
|
trap "" HUP
|
|
|
|
trap "" TERM
|
2007-01-14 02:48:49 +01:00
|
|
|
test -f $DAEMON || exit 0
|
|
|
|
[ ! -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: "
|
2007-01-14 02:48:49 +01:00
|
|
|
$DAEMON
|
|
|
|
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
|