From 154887fa5c685256fb17b53d2b5192c478d059c1 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Sun, 13 Dec 2009 23:20:41 +0100 Subject: [PATCH] collectd.postinst: Let the "collectd" package restart the daemon. "collectd" provides the config file. --- debian/changelog | 5 ++++- debian/collectd.postinst | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 debian/collectd.postinst diff --git a/debian/changelog b/debian/changelog index 335797a..98eb733 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Sun, 13 Dec 2009 22:14:47 +0100 + -- Sebastian Harl 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 index 0000000..8fe5048 --- /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: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# 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 + -- 2.30.2