[pkg-bacula-commits] [bacula] 01/04: make timeout before killing bacula-sd from init script configurable, see STOPTIMEOUT in /etc/default/bacula-sd.conf
Carsten Leonhardt
leo at moszumanska.debian.org
Thu Jun 9 18:12:34 UTC 2016
This is an automated email from the git hooks/post-receive script.
leo pushed a commit to branch master
in repository bacula.
commit fb73270f59d98debecbb2568f096a77515e6de27
Author: Carsten Leonhardt <leo at debian.org>
Date: Tue Jun 7 16:48:09 2016 +0200
make timeout before killing bacula-sd from init script configurable,
see STOPTIMEOUT in /etc/default/bacula-sd.conf
---
debian/additions/common-functions.dpkg | 12 ++++++++++++
debian/bacula-sd.init | 3 ++-
debian/changelog | 2 ++
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/debian/additions/common-functions.dpkg b/debian/additions/common-functions.dpkg
index c6c9b9f..46911b9 100644
--- a/debian/additions/common-functions.dpkg
+++ b/debian/additions/common-functions.dpkg
@@ -225,6 +225,18 @@ ARGS="$ARGS"
CONFIG="$CONFIG"
_EOF
+# special case for bacula-sd: timeout for stop action
+ case "$1" in
+ bacula-sd)
+ cat >>"$tempfile" <<_EOF
+
+# bacula-sd rewinds tapes before stopping, if this takes long, you can
+# adjust the timeout before killing it from the init script here
+#STOPTIMEOUT="180"
+_EOF
+ ;;
+ esac
+
ucf --debconf-ok "$tempfile" "$DEFAULTS"
ucfr $UCFR_ARGS "$PACKAGE" "$DEFAULTS"
rm -f "$tempfile"
diff --git a/debian/bacula-sd.init b/debian/bacula-sd.init
index d3c4b78..5477ff5 100644
--- a/debian/bacula-sd.init
+++ b/debian/bacula-sd.init
@@ -41,6 +41,7 @@ if [ -r /etc/default/$NAME ]; then
fi
CONFIG="${CONFIG:-/etc/bacula/$NAME.conf}"
+STOPTIMEOUT="${STOPTIMEOUT:-180}"
create_var_run_dir
@@ -61,7 +62,7 @@ do_start()
do_stop()
{
start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE \
- --retry TERM/30/KILL/5 --exec $DAEMON -- -c $CONFIG $ARGS
+ --retry TERM/$STOPTIMEOUT/KILL/5 --exec $DAEMON -- -c $CONFIG $ARGS
}
case "$1" in
diff --git a/debian/changelog b/debian/changelog
index d60ca7d..7172963 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,8 @@ bacula (7.4.1~dfsg-1) unstable; urgency=medium
* removed patch to fix update script for postgresql databases
* removed native systemd support pending a working solution which takes
care not to introduce a regression of #825064 (Closes: #826163)
+ * make timeout before killing bacula-sd from init script configurable,
+ see STOPTIMEOUT in /etc/default/bacula-sd.conf
--
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-bacula/bacula.git
More information about the pkg-bacula-commits
mailing list