Debian packaging for zookeeper.
[lui-solr.git] / debian / masterkey-lui-solr5.postrm
diff --git a/debian/masterkey-lui-solr5.postrm b/debian/masterkey-lui-solr5.postrm
new file mode 100755 (executable)
index 0000000..49e2e51
--- /dev/null
@@ -0,0 +1,32 @@
+#!/bin/sh -e
+
+case "$1" in
+    purge|remove)
+       # Remove Solr installation
+       rm -f /usr/share/masterkey/lui/lui-solr
+       rm -rf /usr/share/masterkey/lui/solr-*
+
+        # Automatically added by dh_installinit
+        if [ "$1" = "purge" ] ; then
+           update-rc.d lui-solr remove >/dev/null
+        fi
+
+
+        # In case this system is running systemd, we make systemd reload the unit files
+        # to pick up changes.
+        if [ -d /run/systemd/system ] ; then
+           systemctl --system daemon-reload >/dev/null || true
+        fi
+        # End automatically added section
+
+        ;;
+
+    upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+       ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+esac
+
+exit 0