]> code.citadel.org Git - citadel.git/blobdiff - webcit/debian/citadel-webcit.postrm
* added central location for tiny_mce
[citadel.git] / webcit / debian / citadel-webcit.postrm
index 1b834a654a6ebba773979ddd6dbd29cfcc5f15ba..3eb321bff7c181c5656c40e66ea197d166fb4c03 100644 (file)
@@ -1,10 +1,11 @@
-#! /bin/sh
+#! /bin/sh 
 # postrm.skeleton
 # Skeleton maintainer script showing all the possible cases.
 # Written by Charles Briscoe-Smith, March-June 1998.  Public Domain.
 
 # 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,12 +36,20 @@ 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
-       ### TODO: remove citadel from inittab!
+       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)
     if test "$2" != overwriter; then