#!/bin/sh

set -e

if [ "$1" = "purge" ] ; then
	rmdir "${DPKG_ROOT:-/}var/run/dbus" || true
	rmdir "${DPKG_ROOT:-/}var/lib/dbus" || true

	LAUNCHER=/usr/lib/dbus-1.0/dbus-daemon-launch-helper

	# This respects $DPKG_ROOT
	if dpkg-statoverride --list "$LAUNCHER" >/dev/null 2>&1 ; then
		dpkg-statoverride --remove "$LAUNCHER"
	fi
fi

# Automatically added by dh_installinit/13.11.4
if [ "$1" = "remove" ] && [ -x "/etc/init.d/dbus" ] ; then
	chmod -x "/etc/init.d/dbus" >/dev/null || true
fi
if [ -z "${DPKG_ROOT:-}" ] && [ "$1" = "purge" ] ; then
	update-rc.d dbus remove >/dev/null
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


exit 0
