Your IP : 18.220.217.228


Current Path : /var/lib/dpkg/info/
Upload File :
Current File : /var/lib/dpkg/info/bind9.postrm

#!/bin/sh

set -e

# Automatically added by dh_installinit/13.6ubuntu1
if [ -z "${DPKG_ROOT:-}" ] && [ "$1" = "purge" ] ; then
	update-rc.d named remove >/dev/null
fi
# End automatically added section
# Automatically added by dh_installdeb/13.6ubuntu1
dpkg-maintscript-helper mv_conffile /etc/default/bind /etc/default/named 1:9.13.6\~ -- "$@"
dpkg-maintscript-helper mv_conffile /etc/default/bind9 /etc/default/named 1:9.12.0\~ -- "$@"
dpkg-maintscript-helper mv_conffile /etc/init.d/bind /etc/init.d/named 1:9.13.6\~ -- "$@"
dpkg-maintscript-helper mv_conffile /etc/init.d/bind9 /etc/init.d/named 1:9.12.0\~ -- "$@"
dpkg-maintscript-helper rm_conffile /etc/bind/db.root 1:9.11.4\+dfsg-3\~ -- "$@"
dpkg-maintscript-helper rm_conffile /etc/apparmor.d/local/usr.sbin.named 1:9.11.4\+dfsg-1\~ -- "$@"
# End automatically added section
# Automatically added by dh_installsystemd/13.6ubuntu1
if [ "$1" = remove ] && [ -d /run/systemd/system ] ; then
	systemctl --system daemon-reload >/dev/null || true
fi
# End automatically added section
# Automatically added by dh_installsystemd/13.6ubuntu1
if [ "$1" = "remove" ]; then
	if [ -x "/usr/bin/deb-systemd-helper" ]; then
		deb-systemd-helper mask 'named.service' >/dev/null || true
	fi
fi

if [ "$1" = "purge" ]; then
	if [ -x "/usr/bin/deb-systemd-helper" ]; then
		deb-systemd-helper purge 'named.service' >/dev/null || true
		deb-systemd-helper unmask 'named.service' >/dev/null || true
	fi
fi
# End automatically added section
# Automatically added by dh_installsystemd/13.6ubuntu1
if [ "$1" = remove ] && [ -d /run/systemd/system ] ; then
	systemctl --system daemon-reload >/dev/null || true
fi
# End automatically added section
# Automatically added by dh_installsystemd/13.6ubuntu1
if [ "$1" = "remove" ]; then
	if [ -x "/usr/bin/deb-systemd-helper" ]; then
		deb-systemd-helper mask 'named-resolvconf.service' >/dev/null || true
	fi
fi

if [ "$1" = "purge" ]; then
	if [ -x "/usr/bin/deb-systemd-helper" ]; then
		deb-systemd-helper purge 'named-resolvconf.service' >/dev/null || true
		deb-systemd-helper unmask 'named-resolvconf.service' >/dev/null || true
	fi
fi
# End automatically added section
# Automatically added by dh_apparmor/3.0.4-2ubuntu2.4
if [ "$1" = "purge" ] && ! [ -e "/etc/apparmor.d/usr.sbin.named" ] ; then
    rm -f "/etc/apparmor.d/disable/usr.sbin.named" || true
    rm -f "/etc/apparmor.d/force-complain/usr.sbin.named" || true
    rm -f "/etc/apparmor.d/local/usr.sbin.named" || true
    rm -f /var/cache/apparmor/*/"usr.sbin.named" || true
    rmdir /etc/apparmor.d/disable 2>/dev/null || true
    rmdir /etc/apparmor.d/local   2>/dev/null || true
    rmdir /etc/apparmor.d         2>/dev/null || true
fi
# End automatically added section


if [ "$1" = "purge" ]; then
	rm -f /etc/bind/rndc.key
	rmdir /etc/bind >/dev/null 2>&1 || true
	rm -f /etc/apparmor.d/force-complain/usr.sbin.named >/dev/null 2>&1 || true
	rmdir /var/lib/bind || true
	# delete bind daemon user, if it exists
	if getent passwd bind > /dev/null ; then
		deluser  --quiet bind > /dev/null || true
	fi
fi

exit 0