Fix diogenes.config
[diogenes.git] / debian / diogenes.postrm
index ded38b7..620f924 100644 (file)
@@ -31,6 +31,7 @@ remove_from_webconfig () {
     fi
 }
 
+# FIXME: do we need to source debconf before the hook?
 # source dbconfig-common shell library, and call the hook function
 if [ -f /usr/share/dbconfig-common/dpkg/postrm.mysql ]; then
     . /usr/share/dbconfig-common/dpkg/postrm.mysql 
@@ -62,7 +63,7 @@ purge)
     #
     # Remove ucf-managed files
     #
-    if [ -x $(which ucf) ] ; then
+    if [ -n "$(which ucf)" ] ; then
         for myfile in /etc/diogenes/apache.conf /etc/diogenes/diogenes.debian.inc.php; do
             ucf --purge $myfile
             rm -f $myfile $myfile.dpkg-dist $myfile.dpkg-new $myfile.dpkg-old