]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - modules/stunnel4/files/etc-init.d-stunnel4
Use start-stop-daemon for stopping/restarting stunnel4
[dsa-puppet.git] / 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
 }