Debian purge removes log + services enabled links
authorAdam Dickmeiss <adam@indexdata.dk>
Fri, 15 Jan 2010 12:46:30 +0000 (13:46 +0100)
committerAdam Dickmeiss <adam@indexdata.dk>
Fri, 15 Jan 2010 12:46:30 +0000 (13:46 +0100)
debian/pazpar2.postrm [new file with mode: 0644]

diff --git a/debian/pazpar2.postrm b/debian/pazpar2.postrm
new file mode 100644 (file)
index 0000000..911bac3
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+set -e
+
+if [ "$1" = "purge" ] ; then
+       update-rc.d pazpar2 remove >/dev/null || exit $?
+       rm -f /var/log/pazpar2.log
+       for f in /etc/pazpar2/services-enabled/*; do
+               [ -L "$f" ] && rm -f "$f"
+       done    
+fi
+exit 0