File: //proc/self/root/var/lib/dpkg/info/bird.postrm
#!/bin/sh
set -e
if test "$1" = "purge"; then
# Check if there is no collision of ownership of /etc/bird/bird.conf
if ! which ucf ucfr >/dev/null || ucfr bird /etc/bird/bird.conf 2>/dev/null; then
dpkg-statoverride --remove /etc/bird >/dev/null 2>/dev/null || true
dpkg-statoverride --remove /etc/bird/bird.conf >/dev/null 2>/dev/null || true
for ext in '~' '%' .bak .ucf-new .ucf-old .ucf-dist; do
rm -f /etc/bird/bird.conf$ext
done
rm -f /etc/bird/bird.conf
if which ucf ucfr >/dev/null; then
ucf --purge /etc/bird/bird.conf
ucfr --purge bird /etc/bird/bird.conf
fi
deluser --quiet bird > /dev/null || true
fi
# Cleanup /etc/bird/bird6.conf
dpkg-statoverride --remove /etc/bird/bird6.conf >/dev/null 2>/dev/null || true
for ext in '~' '%' .bak .ucf-new .ucf-old .ucf-dist; do
rm -f /etc/bird/bird6.conf$ext
done
rm -f /etc/bird/bird6.conf
if which ucf ucfr >/dev/null; then
ucf --purge /etc/bird/bird6.conf
ucfr --purge bird /etc/bird/bird6.conf
fi
fi
# Automatically added by dh_installinit/12.1.1~bpo9+1
if [ "$1" = "purge" ] ; then
update-rc.d bird6 remove >/dev/null
fi
# End automatically added section
# Automatically added by dh_installinit/12.1.1~bpo9+1
if [ "$1" = "purge" ] ; then
update-rc.d bird remove >/dev/null
fi
# End automatically added section
# Automatically added by dh_systemd_enable/12.1.1~bpo9+1
if [ "$1" = "remove" ]; then
if [ -x "/usr/bin/deb-systemd-helper" ]; then
deb-systemd-helper mask 'bird.service' 'bird6.service' >/dev/null || true
fi
fi
if [ "$1" = "purge" ]; then
if [ -x "/usr/bin/deb-systemd-helper" ]; then
deb-systemd-helper purge 'bird.service' 'bird6.service' >/dev/null || true
deb-systemd-helper unmask 'bird.service' 'bird6.service' >/dev/null || true
fi
fi
# End automatically added section
# Automatically added by dh_systemd_enable/12.1.1~bpo9+1
if [ "$1" = "remove" ]; then
if [ -x "/usr/bin/deb-systemd-helper" ]; then
deb-systemd-helper mask 'bird.service' >/dev/null || true
fi
fi
if [ "$1" = "purge" ]; then
if [ -x "/usr/bin/deb-systemd-helper" ]; then
deb-systemd-helper purge 'bird.service' >/dev/null || true
deb-systemd-helper unmask 'bird.service' >/dev/null || true
fi
fi
# End automatically added section
exit 0