a8446f910a
debconf support needs to be done in a way that does not duplicate the config file like upstream does. Signed-off-by: strawberry <strawberry@puppygock.gay>
27 lines
623 B
Bash
27 lines
623 B
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
#. /usr/share/debconf/confmodule
|
|
|
|
CONDUWUIT_CONFIG_PATH=/etc/conduwuit
|
|
CONDUWUIT_DATABASE_PATH=/var/lib/conduwuit
|
|
|
|
case $1 in
|
|
purge)
|
|
# Remove debconf changes from the db
|
|
db_purge
|
|
|
|
# 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 "$CONDUWUIT_CONFIG_PATH" ]; then
|
|
rm -v -r "$CONDUWUIT_CONFIG_PATH"
|
|
fi
|
|
|
|
if [ -d "$CONDUWUIT_DATABASE_PATH" ]; then
|
|
rm -v -r "$CONDUWUIT_DATABASE_PATH"
|
|
fi
|
|
;;
|
|
esac
|
|
|
|
#DEBHELPER#
|