[pkg-bacula-commits] [bacula] 01/01: Enable automatic restarting of daemons with systemd (part 1)
Sven Hartge
hartge-guest at moszumanska.debian.org
Fri Jul 15 20:26:45 UTC 2016
This is an automated email from the git hooks/post-receive script.
hartge-guest pushed a commit to branch master-systemd
in repository bacula.
commit ba38bef10d66fca23f6258ec81eb08de4cad118e
Author: Sven Hartge <sven at svenhartge.de>
Date: Fri Jul 15 22:19:00 2016 +0200
Enable automatic restarting of daemons with systemd (part 1)
Add calls to dh_systemd_start to debian/rules, restarting
the daemons on upgrade.
For bacula-sd and bacula-fd this is easy and works out of the box.
The bacula-director on the other hand is spread across a
bacula-director-common and bacula-director-$DBTYPE package.
The restart can't happen via bacula-director-common/prerm and
.../postinst but has to happen in bacula-director-$DBTYPE/prerm and
.../postinst.
The code to stop/start for SysV-init is currently hard coded into
bacula-director-db.prerm.in and bacula-director-db.postrm.in and not
inserted via debhelper.
I could do the same for dh_systemd_start, but I find this hackish and
hope there is a better way to do this (for both init-systems).
---
debian/rules | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/debian/rules b/debian/rules
index 0dccaaa..8e1dc05 100755
--- a/debian/rules
+++ b/debian/rules
@@ -118,6 +118,13 @@ override_dh_installinit-arch:
dh_installinit -pbacula-fd -- defaults 91 9
dh_installinit -pbacula-director-common --name=bacula-director --no-start -- defaults 92 8
+override_dh_systemd_start-arch:
+ifeq ($(HAVE_SYSTEMD),1)
+ dh_systemd_start -pbacula-sd bacula-fd.service
+ dh_systemd_start -pbacula-fd bacula-sd.service
+ dh_systemd_start -pbacula-director-common --no-start bacula-director.service
+endif
+
override_dh_install-arch:
dh_install -a
######### dbconfig-common stuff
--
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