2020-05-31 21:49:07 +01:00
|
|
|
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
|
2021-04-16 21:11:58 +01:00
|
|
|
. /usr/share/debconf/confmodule
|
|
|
|
|
2020-05-31 21:49:07 +01:00
|
|
|
CONDUIT_CONFIG_PATH=/etc/matrix-conduit
|
|
|
|
CONDUIT_DATABASE_PATH=/var/lib/matrix-conduit
|
|
|
|
|
|
|
|
case $1 in
|
|
|
|
purge)
|
2021-04-16 21:11:58 +01:00
|
|
|
# Remove debconf changes from the db
|
|
|
|
db_purge
|
|
|
|
|
2020-05-31 21:49:07 +01:00
|
|
|
# Per https://www.debian.org/doc/debian-policy/ch-files.html#behavior
|
|
|
|
# "configuration files must be preserved when the package is removed, and
|
|
|
|
# only deleted when the package is purged."
|
|
|
|
if [ -d "$CONDUIT_CONFIG_PATH" ]; then
|
|
|
|
rm -r "$CONDUIT_CONFIG_PATH"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -d "$CONDUIT_DATABASE_PATH" ]; then
|
|
|
|
rm -r "$CONDUIT_DATABASE_PATH"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
#DEBHELPER#
|