#!/bin/sh

set -e 

init_failed ()
{
	echo "WARNING: Stopping amavisd-new failed! Upgrade or removal may be incomplete!" 
}
# Automatically added by dh_installinit/13.11.4
if [ -z "${DPKG_ROOT:-}" ] && [ "$1" = remove ] && [ -x "/etc/init.d/amavisd-snmp-subagent" ] ; then
	invoke-rc.d --skip-systemd-native amavisd-snmp-subagent stop || exit 1
fi
# End automatically added section
# Automatically added by dh_installinit/13.11.4
if [ -z "${DPKG_ROOT:-}" ] && [ "$1" = remove ] && [ -x "/etc/init.d/amavis-mc" ] ; then
	invoke-rc.d --skip-systemd-native amavis-mc stop || exit 1
fi
# End automatically added section
# Automatically added by dh_installinit/13.11.4
if [ -z "${DPKG_ROOT:-}" ] && [ "$1" = remove ] && [ -x "/etc/init.d/amavis" ] ; then
	invoke-rc.d --skip-systemd-native amavis stop || exit 1
fi
# End automatically added section
# Automatically added by dh_installsystemd/13.11.4
if [ -z "${DPKG_ROOT:-}" ] && [ "$1" = remove ] && [ -d /run/systemd/system ] ; then
	deb-systemd-invoke stop 'amavisd-snmp-subagent.service' >/dev/null || true
fi
# End automatically added section
# Automatically added by dh_installsystemd/13.11.4
if [ -z "${DPKG_ROOT:-}" ] && [ "$1" = remove ] && [ -d /run/systemd/system ] ; then
	deb-systemd-invoke stop 'amavis-mc.service' >/dev/null || true
fi
# End automatically added section
# Automatically added by dh_installsystemd/13.11.4
if [ -z "${DPKG_ROOT:-}" ] && [ "$1" = remove ] && [ -d /run/systemd/system ] ; then
	deb-systemd-invoke stop 'amavis.service' >/dev/null || true
fi
# End automatically added section


