2020-05-31 20:49:07 +00:00
|
|
|
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
|
2021-04-16 20:11:58 +00:00
|
|
|
. /usr/share/debconf/confmodule
|
|
|
|
|
2024-04-25 04:09:50 +00:00
|
|
|
CONDUWUIT_CONFIG_PATH=/etc/conduwuit
|
|
|
|
CONDUWUIT_DATABASE_PATH=/var/lib/conduwuit
|
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
|
|
|
|
rm -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
|
|
|
|
rm -r "$CONDUWUIT_DATABASE_PATH"
|
2020-05-31 20:49:07 +00:00
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
#DEBHELPER#
|