author | Sebastian Harl <sh@tokkee.org> | |
Sat, 12 Sep 2015 11:08:07 +0000 (13:08 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Sat, 12 Sep 2015 11:08:07 +0000 (13:08 +0200) |
Fix systemd behavior when the config file is missing.
This was causing problems, for example, when only installing collectd-core which does not provide a config file. The old init script handles this gracefully and so does the service file now.
This was causing problems, for example, when only installing collectd-core which does not provide a config file. The old init script handles this gracefully and so does the service file now.
debian/changelog | patch | blob | history | |
debian/collectd-core.collectd.service | [new file with mode: 0644] | patch | blob |
debian/collectd.service | [deleted file] | patch | blob | history |
debian/control | patch | blob | history | |
debian/rules | patch | blob | history |
diff --git a/debian/changelog b/debian/changelog
index 60835f5d4c6809daab4b07864c720b101ef95b13..e1d060f5f9f375be04259d5f2c3082ef179b7ed8 100644 (file)
--- a/debian/changelog
+++ b/debian/changelog
collectd (5.5.0-3) UNRELEASED; urgency=medium
* debian/rules, debian/control:
- - Avoid hiding compiler options, allowing the buildd log scanner to do
- it's job.
+ - Avoid hiding compiler options at build time, allowing the buildd log
+ scanner to do it's job.
- Disable smart plugin on non-linux platforms, due to missing
libatasmart-dev build-dependency.
- Strip out non-deterministic bits out of generated jar files.
* debian/collectd-core.overrides:
- Update 'capitalization-error-in-description' lintian override.
-
- -- Marc Fournier <marc.fournier@camptocamp.com> Tue, 25 Aug 2015 06:55:52 +0200
+ * debian/rules, debian/collectd-core.collectd.service:
+ - Rename systemd service file to collectd-core.collectd.service, to honour
+ debhelper's naming convention.
+ * debian/collectd-core.collectd.service:
+ - Check for configuration file presence before starting the daemon.
+ - Check for configuration file validity before starting the daemon.
+ * debian/control, debian/changelog:
+ - Update my email address to match identity of current GPG key.
+
+ -- Marc Fournier <marc@bl.uem.li> Tue, 25 Aug 2015 06:55:52 +0200
collectd (5.5.0-2) unstable; urgency=low
diff --git a/debian/collectd-core.collectd.service b/debian/collectd-core.collectd.service
--- /dev/null
@@ -0,0 +1,20 @@
+[Unit]
+Description=Statistics collection and monitoring daemon
+After=local-fs.target network.target
+Requires=local-fs.target network.target
+ConditionPathExists=/etc/collectd/collectd.conf
+Documentation=man:collectd(1)
+Documentation=man:collectd.conf(5)
+Documentation=https://collectd.org
+
+[Service]
+Type=notify
+NotifyAccess=main
+EnvironmentFile=-/etc/default/collectd
+ExecStartPre=/usr/sbin/collectd -t
+ExecStart=/usr/sbin/collectd
+Restart=always
+RestartSec=10
+
+[Install]
+WantedBy=multi-user.target
diff --git a/debian/collectd.service b/debian/collectd.service
--- a/debian/collectd.service
+++ /dev/null
@@ -1,18 +0,0 @@
-[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
-EnvironmentFile=-/etc/default/collectd
-ExecStart=/usr/sbin/collectd
-Restart=always
-RestartSec=10
-
-[Install]
-WantedBy=multi-user.target
diff --git a/debian/control b/debian/control
index f89a0c8a4f2e758c5095d4e3a37031e13c772cb7..f6982bd1703bf7a3cf897000e86850ef44eb687f 100644 (file)
--- a/debian/control
+++ b/debian/control
Section: utils
Priority: optional
Maintainer: Sebastian Harl <tokkee@debian.org>
-Uploaders: Marc Fournier <marc.fournier@camptocamp.com>
+Uploaders: Marc Fournier <marc@bl.uem.li>
Build-Depends: debhelper (>= 7.0.50~), dpkg-dev (>= 1.14.10), po-debconf, dh-systemd (>= 1.5), dh-strip-nondeterminism,
bison, flex, autotools-dev, libltdl-dev, pkg-config,
iptables-dev (>= 1.4.3.2-2) [linux-any],
diff --git a/debian/rules b/debian/rules
index 3960dff718620145034dd2c1062d89703aa81d33..0da5b2bebde227c405990e67a406900ca458dc4f 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_systemd_enable -pcollectd-core --name=collectd
dh_installinit -pcollectd-core --name=collectd -- defaults 95
dh_systemd_start -pcollectd-core
dh_link -a