2020-05-31 20:49:07 +00:00
|
|
|
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
|
2024-05-14 02:51:32 +00:00
|
|
|
#. /usr/share/debconf/confmodule
|
2021-04-16 20:11:58 +00:00
|
|
|
|
2024-04-25 04:09:50 +00:00
|
|
|
CONDUWUIT_CONFIG_PATH=/etc/conduwuit
|
|
|
|
CONDUWUIT_DATABASE_PATH=/var/lib/conduwuit
|
2024-05-19 03:26:58 +00:00
|
|
|
CONDUWUIT_DATABASE_PATH_SYMLINK=/var/lib/matrix-conduit
|
2020-05-31 20:49:07 +00:00
|
|
|
|
|
|
|
case $1 in
|
|
|
|
purge)
|
2021-04-16 20:11:58 +00:00
|
|
|
# Remove debconf changes from the db
|
|
|
|
db_purge
|
|
|
|
|
2020-05-31 20:49:07 +00: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."
|
2024-04-25 04:09:50 +00:00
|
|
|
if [ -d "$CONDUWUIT_CONFIG_PATH" ]; then
|
2024-05-14 02:51:32 +00:00
|
|
|
rm -v -r "$CONDUWUIT_CONFIG_PATH"
|
2020-05-31 20:49:07 +00:00
|
|
|
fi
|
|
|
|
|
2024-04-25 04:09:50 +00:00
|
|
|
if [ -d "$CONDUWUIT_DATABASE_PATH" ]; then
|
2024-05-14 02:51:32 +00:00
|
|
|
rm -v -r "$CONDUWUIT_DATABASE_PATH"
|
2020-05-31 20:49:07 +00:00
|
|
|
fi
|
2024-05-19 03:26:58 +00:00
|
|
|
|
|
|
|
if [ -d "$CONDUWUIT_DATABASE_PATH_SYMLINK" ]; then
|
|
|
|
rm -v -r "$CONDUWUIT_DATABASE_PATH_SYMLINK"
|
|
|
|
fi
|
2020-05-31 20:49:07 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
#DEBHELPER#
|