]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
Use start-stop-daemon for stopping/restarting stunnel4
authorTollef Fog Heen <tfheen@err.no>
Mon, 6 Apr 2015 17:28:03 +0000 (19:28 +0200)
committerTollef Fog Heen <tfheen@err.no>
Mon, 6 Apr 2015 17:28:03 +0000 (19:28 +0200)
modules/stunnel4/files/etc-init.d-stunnel4

index 6456bfb7dca4ec523cbb748f204460319dcab107..7bc871ac6686cd6edb3e4d15b37e74fb0c0aa400 100755 (executable)
@@ -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
 }