#! /bin/bash

# Automatically added by dh_installinit/13.11.4
if [ "$1" = "remove" ] && [ -x "/etc/init.d/atop" ] ; then
	chmod -x "/etc/init.d/atop" >/dev/null || true
fi
if [ -z "${DPKG_ROOT:-}" ] && [ "$1" = "purge" ] ; then
	update-rc.d atop remove >/dev/null
fi
# End automatically added section
# Automatically added by dh_installinit/13.11.4
if [ "$1" = "remove" ] && [ -x "/etc/init.d/atopacct" ] ; then
	chmod -x "/etc/init.d/atopacct" >/dev/null || true
fi
if [ -z "${DPKG_ROOT:-}" ] && [ "$1" = "purge" ] ; then
	update-rc.d atopacct remove >/dev/null
fi
# End automatically added section
# Automatically added by dh_installdeb/13.11.4
dpkg-maintscript-helper rm_conffile /etc/logrotate.d/psaccs_atop -- "$@"
dpkg-maintscript-helper rm_conffile /etc/logrotate.d/psaccu_atop -- "$@"
# End automatically added section
# Automatically added by dh_installsystemd/13.11.4
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.11.4
if [ "$1" = "purge" ]; then
	if [ -x "/usr/bin/deb-systemd-helper" ]; then
		deb-systemd-helper purge 'atop-rotate.timer' 'atop.service' 'atopacct.service' >/dev/null || true
	fi
fi
# End automatically added section
# Automatically added by dh_installsystemd/13.11.4
if [ "$1" = remove ] && [ -d /run/systemd/system ] ; then
	systemctl --system daemon-reload >/dev/null || true
fi
# End automatically added section


set -e

if [ "$1" = "purge" ]
then
	rm -rf /var/log/atop
fi

