- optimizacija confa
[php-suhosin-cn.git] / debian / postrm
diff --git a/debian/postrm b/debian/postrm
new file mode 100755 (executable)
index 0000000..96cbcd3
--- /dev/null
@@ -0,0 +1,52 @@
+#!/bin/sh
+# postrm script for monit-cn
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postrm> `remove'
+#        * <postrm> `purge'
+#        * <old-postrm> `upgrade' <new-version>
+#        * <new-postrm> `failed-upgrade' <old-version>
+#        * <new-postrm> `abort-install'
+#        * <new-postrm> `abort-install' <old-version>
+#        * <new-postrm> `abort-upgrade' <old-version>
+#        * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+case "$1" in
+    purge)
+      # continue below
+    ;;
+
+    *)
+        exit 0
+    ;;
+esac
+
+# import CN-functions
+. /usr/share/carnet-tools/functions.sh
+
+CONF=/etc/php5/conf.d/suhosin.ini
+
+# remove us from inittab
+echo "CN: Removing Suhosin tuneups"
+cp-update --comment ';' -r php-suhosin-cn "$CONF"
+
+# reload Apache
+if apache2ctl configtest 2>/dev/null; then
+    echo "CN: Reloading Apache..."
+    invoke-rc.d apache2 force-reload || true
+else
+    echo "CN: Your Apache2 configuration is either broken or nonexistant"
+fi
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0