Create a symlink rather than a file in /etc/apache2/conf.d
[pazpar2-moved-to-github.git] / debian / pazpar2-apache2.postrm
diff --git a/debian/pazpar2-apache2.postrm b/debian/pazpar2-apache2.postrm
new file mode 100644 (file)
index 0000000..9b8456e
--- /dev/null
@@ -0,0 +1,32 @@
+#!/bin/sh -e
+
+case "$1" in
+    purge|remove)
+        WEBSERVERS="apache2"
+        for apache in $WEBSERVERS; do
+            if [ -f "/etc/$apache/conf.d/pazpar2" ]; then
+                echo "Removing pazpar2 configuration file for $apache.."
+                rm -f /etc/$apache/conf.d/pazpar2
+                if [ -f "/var/run/$apache.pid" ]; then
+                    invoke-rc.d $apache reload
+                fi
+            fi
+        done
+        ;;
+    upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+        ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+esac
+
+
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+