# Abort if any command returns an error value
set -e
+. /usr/share/debconf/confmodule
# This script is called twice during the removal of the package; once
# after the removal of the package's files from the system, and as
remove)
# This package is being removed, but its configuration has not yet
# been purged.
-
+ # TODO: remove from inittab.
# Remove diversion
#: dpkg-divert --package foo --remove --rename \
# we mimic dpkg as closely as possible, so we remove configuration
# files with dpkg backup extensions too:
### Some of the following is from Tore Anderson:
- cd /usr/share/doc/citadel-webcit/examples/static; for i in *; do
- i=`echo $i|sed "s;.gz;;"`
- ucf --purge "/var/lib/citadel/www/static/$i"
- rm -f "/var/lib/citadel/www/static/$i"
- done
+ if test -d /var/lib/citadel/www/static; then
+ cd /var/lib/citadel/www/static; for i in *; do
+ i=`echo $i|sed "s;.gz;;"`
+ ucf --purge "/var/lib/citadel/www/static/$i"
+ rm -f "/var/lib/citadel/www/static/$i"
+ done
+ fi
+ #rmdir /var/lib/citadel/www/static
+ echo "/var/lib/citadel/www/keys not removed. "
+ db_purge 'citadel/WebcitHttpsPort'
+ db_purge 'citadel/WebcitHttpPort'
+ db_purge 'citade/WebcitInstallnote'
### TODO: remove citadel from inittab!
;;
disappear)