]> err.no Git - varnish/commitdiff
Postremove for debian
authorbahner <bahner@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 27 Feb 2007 19:54:05 +0000 (19:54 +0000)
committerbahner <bahner@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 27 Feb 2007 19:54:05 +0000 (19:54 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1275 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/debian/changelog
varnish-cache/debian/postrm [new file with mode: 0644]

index 8fb5a7d021e73336062bda2520a1e04b3477a2b0..53096d0028b846fe5a608d54fc44b113f4a23bfb 100644 (file)
@@ -1,3 +1,9 @@
+varnish (1.0.3-2) unstable; urgency=low
+
+  * Added postrm to partially solve 400384 
+
+ -- Lars Bahner <bahner@debian.org>  Tue, 27 Feb 2007 20:41:10 +0100
+
 varnish (1.0.3-1) unstable; urgency=low
 
   * new upstream release
diff --git a/varnish-cache/debian/postrm b/varnish-cache/debian/postrm
new file mode 100644 (file)
index 0000000..66efee0
--- /dev/null
@@ -0,0 +1,44 @@
+#! /bin/sh -e
+
+set -e
+
+case "$1" in
+        remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+
+        if test -e /var/log/varnish && ! [ "$1" = upgrade ]; then
+
+            rm -rf /var/log/varnish 2>&1 > /dev/null || exit 78
+
+        fi
+
+        if test -e /var/lib/varnish; then
+        
+                rm -rf /var/lib/varnish 2>&1 > /dev/null || exit 78
+        fi
+
+        ;;
+
+        purge)
+
+        if test -e /var/log/varnish; then 
+
+                rm -rf /var/log/varnish 2>&1 > /dev/null || exit 78
+                
+        fi
+
+        if test -e /var/lib/varnish; then
+        
+                rm -rf /var/lib/varnish 2>&1 > /dev/null || exit 78
+        fi
+
+        ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 64
+
+esac
+
+#DEBHELPER#
+
+exit 0