Commit a78ea040 authored by Marc Fournier's avatar Marc Fournier
Browse files

add systemd support

Mostly based on recommendations from:
https://wiki.debian.org/Teams/pkg-systemd/Packaging
parent 856568dc
......@@ -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 <marc.fournier@camptocamp.com> Tue, 30 Jun 2015 07:08:39 +0200
......
[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
......@@ -2,7 +2,7 @@ Source: collectd
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,
......
......@@ -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/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment