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:
parent
0c0c2ffffb
commit
c6c10a5a69
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user