File: //var/lib/dpkg/info/rsyslog.postrm
#!/bin/sh
set -e
if [ "$1" = "remove" ]; then
[ -f /etc/logrotate.d/rsyslog ] && mv -f /etc/logrotate.d/rsyslog /etc/logrotate.d/rsyslog.disabled
fi
if [ "$1" = "purge" ] || [ "$1" = "disappear" ]; then
[ -f /etc/logrotate.d/rsyslog.disabled ] && rm -f /etc/logrotate.d/rsyslog.disabled
fi
if [ "$1" = "remove" ]; then
# Cleanup sendsigs omit file to avoid false positives from piuparts
rm -f /run/sendsigs.omit.d/rsyslog
fi
# Automatically added by dh_installinit
if [ "$1" = "purge" ] ; then
update-rc.d rsyslog remove >/dev/null
fi
# In case this system is running systemd, we make systemd reload the unit files
# to pick up changes.
if [ -d /run/systemd/system ] ; then
systemctl --system daemon-reload >/dev/null || true
fi
# End automatically added section
# Automatically added by dh_systemd_enable
if [ "$1" = "remove" ]; then
if [ -x "/usr/bin/deb-systemd-helper" ]; then
deb-systemd-helper mask rsyslog.service >/dev/null
fi
fi
if [ "$1" = "purge" ]; then
if [ -x "/usr/bin/deb-systemd-helper" ]; then
deb-systemd-helper purge rsyslog.service >/dev/null
deb-systemd-helper unmask rsyslog.service >/dev/null
fi
fi
# End automatically added section