summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 856568d)
raw | patch | inline | side by side (parent: 856568d)
author | Marc Fournier <marc.fournier@camptocamp.com> | |
Fri, 3 Jul 2015 22:54:46 +0000 (00:54 +0200) | ||
committer | Marc Fournier <marc.fournier@camptocamp.com> | |
Mon, 6 Jul 2015 21:50:14 +0000 (23:50 +0200) |
Mostly based on recommendations from:
https://wiki.debian.org/Teams/pkg-systemd/Packaging
https://wiki.debian.org/Teams/pkg-systemd/Packaging
debian/changelog | patch | blob | history | |
debian/collectd.service | [new file with mode: 0644] | patch | blob |
debian/control | patch | blob | history | |
debian/rules | patch | blob | history |
diff --git a/debian/changelog b/debian/changelog
index 7d5f3a62189aaca48c221d0a00fca28f95d844e5..c5cfc2f0f2cf0c261d0ca2ff4815033693862a21 100644 (file)
--- a/debian/changelog
+++ b/debian/changelog
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 <marc.fournier@camptocamp.com> Tue, 30 Jun 2015 07:08:39 +0200
diff --git a/debian/collectd.service b/debian/collectd.service
--- /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 fc50307e710d4a896606d397013c6447a48753cc..ddee9734645393ad9e552f512b65aa35b8f3cc46 100644 (file)
--- a/debian/control
+++ b/debian/control
Section: utils
Priority: optional
Maintainer: Sebastian Harl <tokkee@debian.org>
-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 f9313e3803e5ee8483a89fa3955abe75dfe24d3a..334690908861e71a24e7abd044a3afac8f1e1656 100755 (executable)
--- a/debian/rules
+++ b/debian/rules
&& 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/