Code

Update copyright
[pkg-nagvis.git] / debian / postrm
index 38815e7692c72b7061fd763a0ef685969fb9c0b3..1615814198634f270e44fb885ee0c4ed8055c427 100644 (file)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# postrm script for #PACKAGE#
+# postrm script for nagvis
 #
 # see: dh_installdeb(1)
 
@@ -9,7 +9,7 @@ if [ -f /usr/share/debconf/confmodule ]; then
        . /usr/share/debconf/confmodule
 fi
 
-if [ -f /usr/share/dbconfig-common/dpkg/postrm.@@DB@@ ]; then
+if [ -f /usr/share/dbconfig-common/dpkg/postrm.mysql ]; then
        . /usr/share/dbconfig-common/dpkg/frontend.postrm.mysql
        dbc_go nagvis $@
 fi
@@ -41,12 +41,16 @@ esac
 if [ "$1" = "purge" ]; then
        for file in apache.conf nagvis.ini.php; do
                rm -f /etc/nagvis/$file
-               ucf --purge /etc/nagvis/$file
+               if [ -x /usr/bin/ucf ] ; then
+                       ucf --debconf-ok --purge /etc/nagvis/$file
+               fi
        done
 
        #if [ -e /etc/apache2/conf.d/nagvis.conf ]; then
        #       rm -f /etc/apache2/conf.d/nagvis.conf
        #fi
+
+       rm -rf /var/cache/nagvis
 fi
        
 # dh_installdeb will replace this with shell code automatically