From: Tollef Fog Heen Date: Mon, 6 Apr 2015 17:28:03 +0000 (+0200) Subject: Use start-stop-daemon for stopping/restarting stunnel4 X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=b73d2475a76c6b59dde700416f1fed8d29cab562;p=mirror%2Fdsa-puppet.git Use start-stop-daemon for stopping/restarting stunnel4 --- diff --git a/modules/stunnel4/files/etc-init.d-stunnel4 b/modules/stunnel4/files/etc-init.d-stunnel4 index 6456bfb7d..7bc871ac6 100755 --- a/modules/stunnel4/files/etc-init.d-stunnel4 +++ b/modules/stunnel4/files/etc-init.d-stunnel4 @@ -76,9 +76,9 @@ killdaemons() { for file in $FILES; do PROCLIST=`get_pids $file` - if [ "$PROCLIST" ] && kill -0 $PROCLIST 2>/dev/null; then - kill $PROCLIST - echo -n "[stopped: $file] " + for p in $PROCLIST; do + start-stop-daemon --stop --retry 30 --pid "$p" + echo -n "[stopped: $file] " fi done }