File: //var/lib/dpkg/info/sendmail-wrapper.postinst
#!/bin/sh
set -e
case "$1" in
configure)
update-alternatives \
--install /usr/sbin/sendmail sendmail \
/usr/sbin/sendmail_client 10 \
--slave /usr/lib/sendmail usr_lib_sendmail \
/usr/sbin/sendmail_client
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# Automatically added by dh_systemd_enable
# This will only remove masks created by d-s-h on package removal.
deb-systemd-helper unmask sendmail-wrapper.service >/dev/null || true
# was-enabled defaults to true, so new installations run enable.
if deb-systemd-helper --quiet was-enabled sendmail-wrapper.service; then
# Enables the unit on first installation, creates new
# symlinks on upgrades if the unit file has changed.
deb-systemd-helper enable sendmail-wrapper.service >/dev/null || true
else
# Update the statefile to add new symlinks (if any), which need to be
# cleaned up on purge. Also remove old symlinks.
deb-systemd-helper update-state sendmail-wrapper.service >/dev/null || true
fi
# End automatically added section
# Automatically added by dh_installinit
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
# In case this system is running systemd, we need to ensure that all
# necessary tmpfiles (if any) are created before starting.
if [ -d /run/systemd/system ] ; then
systemd-tmpfiles --create /usr/lib/tmpfiles.d/sendmail-wrapper.conf >/dev/null || true
fi
fi
# End automatically added section
# Automatically added by dh_installinit
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
if [ -x "/etc/init.d/sendmail-wrapper" ]; then
update-rc.d sendmail-wrapper defaults >/dev/null
invoke-rc.d sendmail-wrapper start || exit $?
fi
fi
# End automatically added section
exit 0