summaryrefslogtreecommitdiffstats
path: root/debian/icingaweb2.postrm
diff options
context:
space:
mode:
Diffstat (limited to 'debian/icingaweb2.postrm')
-rw-r--r--debian/icingaweb2.postrm19
1 files changed, 19 insertions, 0 deletions
diff --git a/debian/icingaweb2.postrm b/debian/icingaweb2.postrm
new file mode 100644
index 0000000..6ced15e
--- /dev/null
+++ b/debian/icingaweb2.postrm
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+set -e
+
+# Apache2
+if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
+ echo "disabling Apache2 configuration ..."
+ . /usr/share/apache2/apache2-maintscript-helper
+ apache2_invoke disconf icingaweb2
+fi
+if [ -L /etc/apache2/conf.d/icingaweb2.conf ]; then
+ echo "removing link /etc/apache2/conf.d/icingaweb2.conf ..."
+ # remove link to config
+ rm -f /etc/apache2/conf.d/icingaweb2.conf
+ # reload webserver
+ [ -x $(which invoke-rc.d) ] && invoke-rc.d apache2 reload || true
+fi
+
+#DEBHELPER#