[pkg-bacula-commits] [SCM] Bacula, a network backup, recovery and verification program branch, master, updated. debian/5.2.6+dfsg-3-3-g037b600
Alexander Golovko
alexandro at ankalagon.ru
Fri Aug 17 08:40:19 UTC 2012
The following commit has been merged in the master branch:
commit d4052cfbafbcb1718b687886a7b01198f06fb0a1
Author: Alexander Golovko <alexandro at ankalagon.ru>
Date: Fri Aug 17 12:03:09 2012 +0400
Make bacula-director init script more standard
Allow to start-stop-daemon control real daemon stoping instead of
control this manually.
Remove unused check_pid function.
diff --git a/debian/bacula-director-common.bacula-director.init b/debian/bacula-director-common.bacula-director.init
index 22ffcf6..873de80 100644
--- a/debian/bacula-director-common.bacula-director.init
+++ b/debian/bacula-director-common.bacula-director.init
@@ -58,11 +58,6 @@ get_pid()
else pid=""; fi
}
-check_pid()
-{
- /bin/ps -p $1 >/dev/null 2>&1; return $?
-}
-
kill_pid()
{
kill -$1 $2 2>/dev/null || true
@@ -78,24 +73,8 @@ do_start()
# do_stop()
do_stop()
{
- get_pid $PIDFILE ;
start-stop-daemon -c "$DAEMONUSER" --stop --quiet --pidfile $PIDFILE \
- --oknodo --exec $DAEMON -- -c $CONFIG $ARGS
- # make sure daemon is stopped/killed
- if [ -n "$pid" ]; then
- if check_pid $pid ; then
- # TERM first, then KILL if not dead
- kill_pid TERM $pid
- sleep 1
- if check_pid $pid ; then
- sleep 1 # some time to die peacefully...
- if check_pid $pid ; then
- sleep 3
- if check_pid $pid ; then kill_pid KILL $pid ; fi
- fi
- fi
- fi
- fi
+ --oknodo --retry TERM/30/KILL/5 --exec $DAEMON -- -c $CONFIG $ARGS
}
@@ -135,7 +114,6 @@ case "$1" in
restart|force-reload)
$0 stop
- sleep 1
$0 start
;;
--
Bacula, a network backup, recovery and verification program
More information about the pkg-bacula-commits
mailing list