* Apache config package added
[citadel.git] / webcit / debian / citadel-webcit.postrm
index 1b834a654a6ebba773979ddd6dbd29cfcc5f15ba..63e9d9fc7c804bd3431a8b0631e2cbddc576fac9 100644 (file)
@@ -5,6 +5,7 @@
 
 # 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
@@ -18,7 +19,7 @@ case "$1" in
   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 \
@@ -35,11 +36,18 @@ case "$1" in
     # 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)