mirror of https://github.com/sipwise/collectd.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.3 KiB
46 lines
1.3 KiB
#! /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
|
|
|
|
# replace the directory provided by older versions of the package with a
|
|
# symlink; dpkg does not handle that according to policy 6.6
|
|
if [ "$1" = "configure" ] \
|
|
&& dpkg --compare-versions "$2" lt-nl "4.10.0-1~"; then
|
|
if [ -d "/usr/share/doc/collectd/examples" ]; then
|
|
! rmdir /usr/share/doc/collectd/examples > /dev/null 2>&1 \
|
|
|| ln -s ../collectd-core/examples \
|
|
/usr/share/doc/collectd/examples
|
|
fi
|
|
fi
|
|
|
|
# dh_installdeb will replace this with shell code automatically
|
|
# generated by other debhelper scripts.
|
|
|
|
#DEBHELPER#
|
|
|
|
exit 0
|
|
|