From: Marc Fournier Date: Fri, 3 Jul 2015 22:54:46 +0000 (+0200) Subject: add systemd support X-Git-Tag: collectd-5.5.0-1~20 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a78ea040cb931a96190bcf6fc55643b41ccc311d;p=pkg-collectd.git add systemd support Mostly based on recommendations from: https://wiki.debian.org/Teams/pkg-systemd/Packaging --- diff --git a/debian/changelog b/debian/changelog index 7d5f3a6..c5cfc2f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -34,6 +34,8 @@ collectd (5.5.0-1) UNRELEASED; urgency=medium plugin). - Add Build-depend on libudev-dev (used by disk plugin to enable udev-based device renaming on Linux) (Closes: #588153, #632936). + * debian/control, debian/rules, debian/collectd.service: + - Add systemd service file (Closes: #762586) -- Marc Fournier Tue, 30 Jun 2015 07:08:39 +0200 diff --git a/debian/collectd.service b/debian/collectd.service new file mode 100644 index 0000000..806d804 --- /dev/null +++ b/debian/collectd.service @@ -0,0 +1,17 @@ +[Unit] +Description=Statistics collection and monitoring daemon +After=local-fs.target network.target +Requires=local-fs.target network.target +Documentation=man:collectd(1) +Documentation=man:collectd.conf(5) +Documentation=https://collectd.org + +[Service] +Type=notify +NotifyAccess=main +ExecStart=/usr/sbin/collectd +Restart=always +RestartSec=10 + +[Install] +WantedBy=multi-user.target diff --git a/debian/control b/debian/control index fc50307..ddee973 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: collectd Section: utils Priority: optional Maintainer: Sebastian Harl -Build-Depends: debhelper (>= 5), dpkg-dev (>= 1.14.10), po-debconf, dpatch, +Build-Depends: debhelper (>= 5), dpkg-dev (>= 1.14.10), po-debconf, dpatch, dh-systemd (>= 1.5), bison, flex, autotools-dev, libltdl-dev, pkg-config, iptables-dev (>= 1.4.3.2-2) [linux-any], javahelper, diff --git a/debian/rules b/debian/rules index f9313e3..3346909 100755 --- a/debian/rules +++ b/debian/rules @@ -272,7 +272,9 @@ binary-arch: build install-arch && rm -f lib/Collectd/Graph/File.pm lib/Collectd/Graph/Filter.pm \ && rm -f lib/Collectd/Graph/MetaData.pm ) dh_installdebconf -a + dh_systemd_enable -pcollectd-core --name=collectd collectd.service dh_installinit -pcollectd-core --name=collectd -- defaults 95 + dh_systemd_start dh_link -a dh_strip -a --dbg-package=collectd-dbg dh_compress -a -Xexamples/