#!/bin/sh

set -e

#
# Prevent systemd from being removed if it's the active init.  That
# will not work.
#

if [ "$1" = "remove" ] && [ -d /run/systemd/system ]; then
    echo "systemd is the active init system, please switch to another before removing systemd."
    exit 1
fi

# Automatically added by dh_installsystemd/14.3ubuntu1
if [ -z "$DPKG_ROOT" ] && [ "$1" = remove ] && [ -d /run/systemd/system ] ; then
	deb-systemd-invoke stop 'systemd-journald.service' 'systemd-networkd.service' >/dev/null || true
fi
# End automatically added section
# Automatically added by dh_installdeb/14.3ubuntu1
dpkg-maintscript-helper rm_conffile /etc/systemd/resolved.conf 251.3-2\~ -- "$@"
# End automatically added section

