File: /var/lib/dpkg/info/avahi-daemon.prerm
#!/bin/sh
set -e
# avoid cancelling of "stop" via socket or D-Bus activation
if [ -d /run/systemd/system ] && [ "$1" = remove ]; then
systemctl mask --runtime avahi-daemon.service
# stop avahi-daemon manually since invoke-rc.d currently doesn't
# deal with masked services (see Bug #717109)
systemctl stop avahi-daemon.service || true
fi
# Automatically added by dh_installinit/12.10ubuntu1
if [ -x "/etc/init.d/avahi-daemon" ] && [ "$1" = remove ]; then
invoke-rc.d avahi-daemon stop || exit 1
fi
# End automatically added section