Code

Merge pull request #3 from mfournier/more-changes-for-5.5.0-3
authorSebastian Harl <sh@tokkee.org>
Sat, 12 Sep 2015 11:08:07 +0000 (13:08 +0200)
committerSebastian 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.

debian/changelog
debian/collectd-core.collectd.service [new file with mode: 0644]
debian/collectd.service [deleted file]
debian/control
debian/rules

index 60835f5d4c6809daab4b07864c720b101ef95b13..e1d060f5f9f375be04259d5f2c3082ef179b7ed8 100644 (file)
@@ -1,15 +1,23 @@
 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
new file mode 100644 (file)
index 0000000..e179f76
--- /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
deleted file mode 100644 (file)
index 2fee302..0000000
+++ /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
index f89a0c8a4f2e758c5095d4e3a37031e13c772cb7..f6982bd1703bf7a3cf897000e86850ef44eb687f 100644 (file)
@@ -2,7 +2,7 @@ Source: collectd
 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],
index 3960dff718620145034dd2c1062d89703aa81d33..0da5b2bebde227c405990e67a406900ca458dc4f 100755 (executable)
@@ -281,7 +281,7 @@ 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_systemd_enable -pcollectd-core --name=collectd
        dh_installinit -pcollectd-core --name=collectd -- defaults 95
        dh_systemd_start -pcollectd-core
        dh_link -a