1
0
mirror of https://github.com/cmur2/dyndnsd.git synced 2024-12-21 14:54:22 +01:00

Improve init script

This commit is contained in:
cn 2013-06-08 09:59:32 +02:00
parent 0c0c2ffffb
commit c6c10a5a69

View File

@ -23,18 +23,21 @@ case "$1" in
start)
log_daemon_msg "Starting dyndnsd.rb" "dyndnsd"
start-stop-daemon --start --quiet --oknodo --make-pidfile --pidfile "/var/run/dyndnsd.pid" --background --exec $DAEMON -- $DAEMON_OPTS
log_end_msg $?
;;
stop)
log_daemon_msg "Stopping dyndnsd.rb" "dyndnsd"
start-stop-daemon --stop --quiet --oknodo --pidfile "/var/run/dyndnsd.pid"
log_end_msg $?
;;
restart|force-reload)
log_daemon_msg "Restarting dyndnsd.rb" "dyndnsd"
start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile "/var/run/dyndsd.pid"
start-stop-daemon --start --quiet --oknodo --make-pidfile --pidfile "/var/run/dyndnsd.pid" --background --exec $DAEMON -- $DAEMON_OPTS
log_end_msg $?
;;
*)
echo "Usage: $0 {start|stop|restart|force-reload}" >&2
exit 1
log_action_msg "Usage: $0 {start|stop|restart|force-reload}"
exit 2
;;
esac