doinst.sh (benno-smtp-2.6.0.tgz) | : | doinst.sh (benno-smtp-2.8.0.tgz) | ||
---|---|---|---|---|
skipping to change at line 22 | skipping to change at line 22 | |||
# <new-version> | # <new-version> | |||
# * <postinst> `abort-remove' | # * <postinst> `abort-remove' | |||
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour' | # * <deconfigured's-postinst> `abort-deconfigure' `in-favour' | |||
# <failed-install-package> <version> `removing' | # <failed-install-package> <version> `removing' | |||
# <conflicting-package> <version> | # <conflicting-package> <version> | |||
# for details, see http://www.debian.org/doc/debian-policy/ or | # for details, see http://www.debian.org/doc/debian-policy/ or | |||
# the debian-policy package | # the debian-policy package | |||
case "$1" in | case "$1" in | |||
configure) | configure) | |||
if [ -x "/etc/init.d/benno-smtp" ]; then | ||||
update-rc.d benno-smtp defaults >/dev/null | ||||
set +e | ||||
/etc/init.d/benno-smtp start | ||||
fi | ||||
;; | ;; | |||
abort-upgrade|abort-remove|abort-deconfigure) | abort-upgrade|abort-remove|abort-deconfigure) | |||
;; | ;; | |||
*) | *) | |||
echo "postinst called with unknown argument \`$1'" >&2 | echo "postinst called with unknown argument \`$1'" >&2 | |||
exit 1 | exit 1 | |||
;; | ;; | |||
esac | esac | |||
perl -p -i -e 's/^BENNOCOREDIR=\/opt\/benno$/BENNOCOREDIR=\/opt\/benno-smtp/' /e | set +e | |||
tc/init.d/benno-smtp | chown --silent benno.benno /var/log/benno | |||
chown --silent benno.benno /srv/benno/inbox | ||||
chmod --silent 2770 /srv/benno/inbox | ||||
set -e | ||||
# Automatically added by dh_systemd_enable/13.3.4 | ||||
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-decon | ||||
figure" ] || [ "$1" = "abort-remove" ] ; then | ||||
# This will only remove masks created by d-s-h on package removal. | ||||
deb-systemd-helper unmask 'benno-smtp.service' >/dev/null || true | ||||
# was-enabled defaults to true, so new installations run enable. | ||||
if deb-systemd-helper --quiet was-enabled 'benno-smtp.service'; then | ||||
# Enables the unit on first installation, creates new | ||||
# symlinks on upgrades if the unit file has changed. | ||||
deb-systemd-helper enable 'benno-smtp.service' >/dev/null || true | ||||
else | ||||
# Update the statefile to add new symlinks (if any), which need t | ||||
o be | ||||
# cleaned up on purge. Also remove old symlinks. | ||||
deb-systemd-helper update-state 'benno-smtp.service' >/dev/null | | ||||
| true | ||||
fi | ||||
fi | ||||
# End automatically added section | ||||
# Automatically added by dh_systemd_start/13.3.4 | ||||
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-decon | ||||
figure" ] || [ "$1" = "abort-remove" ] ; then | ||||
if [ -d /run/systemd/system ]; then | ||||
systemctl --system daemon-reload >/dev/null || true | ||||
if [ -n "$2" ]; then | ||||
_dh_action=restart | ||||
else | ||||
_dh_action=start | ||||
fi | ||||
deb-systemd-invoke $_dh_action 'benno-smtp.service' >/dev/null || | ||||
true | ||||
fi | ||||
fi | ||||
# End automatically added section | ||||
# Automatically added by dh_installinit/13.3.4 | ||||
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-decon | ||||
figure" ] || [ "$1" = "abort-remove" ] ; then | ||||
if [ -x "/etc/init.d/benno-smtp" ]; then | ||||
update-rc.d benno-smtp defaults >/dev/null | ||||
if [ -n "$2" ]; then | ||||
_dh_action=restart | ||||
else | ||||
_dh_action=start | ||||
fi | ||||
invoke-rc.d benno-smtp $_dh_action || exit 1 | ||||
fi | ||||
fi | ||||
# End automatically added section | ||||
exit 0 | exit 0 | |||
End of changes. 3 change blocks. | ||||
7 lines changed or deleted | 56 lines changed or added |