[Pkg-nagios-changes] [pkg-icinga2] 15/15: Add support for systemd
Alexander Wirt
formorer at debian.org
Thu Nov 20 13:22:57 UTC 2014
This is an automated email from the git hooks/post-receive script.
formorer pushed a commit to branch master
in repository pkg-icinga2.
commit 83a2c2ae3d67e03944b706cfa456ec0e27e3a1c7
Author: Alexander Wirt <formorer at debian.org>
Date: Thu Nov 20 14:22:37 2014 +0100
Add support for systemd
---
debian/control | 1 +
debian/icinga2-common.icinga2.service | 13 +++++++++++++
debian/icinga2-common.install | 2 ++
debian/rules | 7 +++++--
4 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/debian/control b/debian/control
index 13ca150..7cadc4c 100644
--- a/debian/control
+++ b/debian/control
@@ -8,6 +8,7 @@ Uploaders: Markus Frosch <lazyfrosch at debian.org>,
Build-Depends: bison,
cmake (>= 2.8.7),
debhelper (>= 9),
+ dh-systemd (>= 1.5),
flex,
g++ (>= 1.96),
libboost-dev,
diff --git a/debian/icinga2-common.icinga2.service b/debian/icinga2-common.icinga2.service
new file mode 100644
index 0000000..dd1eace
--- /dev/null
+++ b/debian/icinga2-common.icinga2.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Icinga host/service/network monitoring system
+After=postgresql.service mariadb.service carbon-cache.service mysql.service
+
+[Service]
+Type=simple
+ExecStartPre=/usr/lib/icinga2/icinga2-prepare-dirs /usr/lib/icinga2/icinga2
+ExecStart=/usr/sbin/icinga2 daemon
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/debian/icinga2-common.install b/debian/icinga2-common.install
index 342de6f..cd78257 100644
--- a/debian/icinga2-common.install
+++ b/debian/icinga2-common.install
@@ -4,3 +4,5 @@ debian/tmp/etc/logrotate.d
tools/syntax/* usr/share/icinga2-common/syntax
usr/share/icinga2
debian/tmp/etc/bash_completion.d
+etc/initsystem/icinga2-prepare-dirs usr/lib/icinga2
+etc/sysconfig/icinga2 usr/lib/icinga2
diff --git a/debian/rules b/debian/rules
index df07e0d..7f7ce15 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,8 +3,10 @@
#export DH_VERBOSE=1
%:
- dh $@
+ dh $@ --with systemd
+override_dh_systemd_enable:
+ dh_systemd_enable --name=icinga2
override_dh_auto_build:
dh_auto_build --parallel
@@ -29,11 +31,12 @@ override_dh_auto_configure:
override_dh_auto_install:
dh_auto_install
- # remove features-enabled - these will be activated by postinst later
+ # remove features-enabled - these will be activated by postinst later
rm -r debian/tmp/etc/icinga2/features-enabled/*
override_dh_install:
dh_install
+ chmod +x debian/icinga2-common/usr/lib/icinga2/icinga2-prepare-dirs
# remove ido files from other packages
if [ -d debian/icinga2-common/ ]; then rm debian/icinga2-common/etc/icinga2/features-available/ido-*; fi
rm debian/icinga2-bin/usr/lib/*/icinga2/libdb_ido_*
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-nagios/pkg-icinga2.git
More information about the Pkg-nagios-changes
mailing list