]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
- try ssd for killproc. needs pidfile to work reliably
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 16 Dec 2008 18:55:36 +0000 (18:55 +0000)
committerElan Ruusamäe <glen@pld-linux.org>
Tue, 16 Dec 2008 18:55:36 +0000 (18:55 +0000)
- what values to use for --retry?

svn-id: @10037

rc.d/init.d/functions

index aacd423ce95d423419a053cff714f67f1ae578a2..581866fe1347a9d8f6c205e209f13840316835c6 100644 (file)
@@ -668,9 +668,27 @@ killproc() {
                killlevel=$2
        else
                notset=1
-               killlevel="-9"
+               killlevel="-KILL"
        fi
 
+       # experimental start-stop-daemon based killing.
+       # works only with pidfile
+       if is_no "$RC_LOGGING" && [ "$pidfile" ]; then
+               local sig=${killevel:--TERM}
+               /sbin/start-stop-daemon --stop \
+                       --retry ${sig#-}/10/${sig#-}/60/KILL/10 \
+                       -s ${sig#-} \
+                       ${pidfile:+--pidfile $pidfile}
+               result=$?
+               if [ "$result" -eq 0 ]; then
+                       ok
+               else
+                       fail
+               fi
+               return $result
+       fi
+
+
        # Save basename.
        base=${1##*/}
 
This page took 0.057003 seconds and 4 git commands to generate.