Changed files:
proftpd.init -> 1.10
exit 0
fi
-RETVAL=0
-# See how we were called.
-case "$1" in
- start)
+start() {
# Check if the service is already running?
if [ ! -f /var/lock/subsys/proftpd ]; then
msg_starting ProFTPD
else
msg_already_running ProFTPD
fi
- ;;
- stop)
+}
+
+stop() {
# Stop daemons.
if [ -f /var/lock/subsys/proftpd ]; then
msg_stopping ProFTPD
else
msg_not_running ProFTPD
fi
+}
+
+
+condrestart() {
+ if [ -f /var/lock/subsys/proftpd ]; then
+ stop
+ start
+ else
+ msg_not_running proftpd
+ RETVAL=$1
+ fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ stop
+ start
+ ;;
+ try-restart)
+ condrestart 0
+ ;;
+ force-reload)
+ condrestart 7
;;
status)
status proftpd
exit $?
;;
- restart|force-reload)
- $0 stop
- $0 start
- exit $?
- ;;
*)
- msg_usage "$0 {start|stop|restart|force-reload|status}"
+ msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
exit 3
esac