#!/bin/sh # postrm script for mosquitto # # see: dh_installdeb(1) set -e case "$1" in purge) rm -f /var/lib/mosquitto/mosquitto.db if [ -d /var/lib/mosquitto ]; then rmdir --ignore-fail-on-non-empty /var/lib/mosquitto fi rm -f /var/log/mosquitto/mosquitto.log* if [ -d /var/log/mosquitto ]; then rmdir --ignore-fail-on-non-empty /var/log/mosquitto fi rm -f /run/mosquitto/mosquitto.pid if [ -d /run/mosquitto ]; then rmdir --ignore-fail-on-non-empty /run/mosquitto fi APP_PROFILE="usr.sbin.mosquitto" rm -f /etc/apparmor.d/disable/$APP_PROFILE >/dev/null 2>&1 || true ;; remove|abort-install|abort-upgrade|disappear) ;; upgrade|failed-upgrade) ;; *) echo "postrm called with unknown argument \`$1'" >&2 exit 1 ;; esac # Automatically added by dh_installinit/13.3.4 if [ "$1" = "purge" ] ; then update-rc.d mosquitto remove >/dev/null fi # End automatically added section # Automatically added by dh_installsystemd/13.3.4 if [ -d /run/systemd/system ] && [ "$1" = remove ]; then systemctl --system daemon-reload >/dev/null || true fi # End automatically added section # Automatically added by dh_installsystemd/13.3.4 if [ "$1" = "remove" ]; then if [ -x "/usr/bin/deb-systemd-helper" ]; then deb-systemd-helper mask 'mosquitto.service' >/dev/null || true fi fi if [ "$1" = "purge" ]; then if [ -x "/usr/bin/deb-systemd-helper" ]; then deb-systemd-helper purge 'mosquitto.service' >/dev/null || true deb-systemd-helper unmask 'mosquitto.service' >/dev/null || true fi fi # End automatically added section exit 0