summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9a11250)
raw | patch | inline | side by side (parent: 9a11250)
author | Sebastian Harl <sh@tokkee.org> | |
Sun, 13 Dec 2009 22:20:41 +0000 (23:20 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Sun, 13 Dec 2009 22:20:41 +0000 (23:20 +0100) |
"collectd" provides the config file.
debian/changelog | patch | blob | history | |
debian/collectd.postinst | [new file with mode: 0644] | patch | blob |
diff --git a/debian/changelog b/debian/changelog
index 335797a1923d69bc5fb857a563e9d49bae071d9d..98eb733d962276082c8b13e7b3b75490a8beeeb3 100644 (file)
--- a/debian/changelog
+++ b/debian/changelog
- Do not (try to) start collectd if the config file does not exist. Else,
installation of "collectd-core" (which does not provide configuration)
would fail.
+ * debian/collectd.postinst:
+ - Let the "collectd" package restart the daemon, since it provides the
+ config file.
* debian/collectd.links:
- Symlink /u/s/d/collectd/examples to /u/s/d/collectd-core/examples.
* debian/control:
thanks to Lamont Jones and Dann Frazier for reporting this
(Closes: #559087).
- -- Sebastian Harl <tokkee@debian.org> Sun, 13 Dec 2009 22:14:47 +0100
+ -- Sebastian Harl <tokkee@debian.org> Sun, 13 Dec 2009 23:19:40 +0100
collectd (4.8.1-2) unstable; urgency=low
diff --git a/debian/collectd.postinst b/debian/collectd.postinst
--- /dev/null
+++ b/debian/collectd.postinst
@@ -0,0 +1,34 @@
+#! /bin/sh
+# postinst script for collectd
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <postinst> `abort-remove'
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ -x "/etc/init.d/collectd" ]; then
+ if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+ invoke-rc.d collectd restart || exit $?
+ else
+ /etc/init.d/collectd restart || exit $?
+ fi
+fi
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+