Code

collectd.postinst: Let the "collectd" package restart the daemon.
authorSebastian Harl <sh@tokkee.org>
Sun, 13 Dec 2009 22:20:41 +0000 (23:20 +0100)
committerSebastian Harl <sh@tokkee.org>
Sun, 13 Dec 2009 22:20:41 +0000 (23:20 +0100)
"collectd" provides the config file.

debian/changelog
debian/collectd.postinst [new file with mode: 0644]

index 335797a1923d69bc5fb857a563e9d49bae071d9d..98eb733d962276082c8b13e7b3b75490a8beeeb3 100644 (file)
@@ -10,6 +10,9 @@ collectd (4.8.1-3) unstable; urgency=low
     - 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:
@@ -20,7 +23,7 @@ collectd (4.8.1-3) unstable; urgency=low
       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
new file mode 100644 (file)
index 0000000..8fe5048
--- /dev/null
@@ -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
+