diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-08-21 15:21:33 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-08-21 15:21:33 +0200 |
commit | 3377abb5b54d2b5dde72f7b715c3912f2a4000b4 (patch) | |
tree | 22f0fc1365d030588fe8c2e9a0f5c10840fe2d2d /debian/sane-utils.saned.init | |
parent | 12b1eace4b6bb7e434dca98dbab2a957a0c1d3ae (diff) |
correct handling of the initscript stop and restart actions
Diffstat (limited to 'debian/sane-utils.saned.init')
-rw-r--r-- | debian/sane-utils.saned.init | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/debian/sane-utils.saned.init b/debian/sane-utils.saned.init index 7b9fe18..5c87fc1 100644 --- a/debian/sane-utils.saned.init +++ b/debian/sane-utils.saned.init @@ -52,7 +52,7 @@ case "$1" in stop) log_daemon_msg "Stopping $DESC" "$NAME" start-stop-daemon --stop --oknodo --quiet --pidfile /var/run/$NAME.pid \ - --exec $DAEMON + --retry --exec $DAEMON log_end_msg $? ;; force-reload) @@ -64,12 +64,8 @@ case "$1" in ;; restart) log_daemon_msg "Restarting $DESC" "$NAME" - start-stop-daemon --stop --oknodo --quiet --pidfile \ - /var/run/$NAME.pid --exec $DAEMON - sleep 1 - start-stop-daemon --start --quiet --pidfile \ - /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS - log_end_msg $? + $0 stop + $0 start ;; status) if [ -s /var/run/$NAME.pid ]; then @@ -97,5 +93,3 @@ case "$1" in exit 1 ;; esac - -exit 0 |