#!/bin/sh
set -e

rm -f /etc/frr/.pkg.frr.nointegrated

if [ "$1" = "purge" ]; then
	rm -rf /run/frr || true

	# "purge" does not remove logfiles.  therefore we shouldn't delete
	# the "frr" user/group since that would leave files with "dangling"
	# ownership.
fi

# 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 'frr.service' >/dev/null || true
	fi
fi
# End automatically added section

