From 3e2c530281de10f7cf0ce949f6348b54ef9b8756 Mon Sep 17 00:00:00 2001
From: HungryHobo <HungryHobo@mail.i2p>
Date: Sun, 31 Oct 2010 19:54:49 +0000
Subject: [PATCH] Fix error message with dpkg --purge

---
 debian/scripts/postrm | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/debian/scripts/postrm b/debian/scripts/postrm
index f4c7218a2e..a768a036c3 100755
--- a/debian/scripts/postrm
+++ b/debian/scripts/postrm
@@ -1,4 +1,12 @@
 #!/bin/sh
+
+# $1 is either "remove" or "purge". Since there are no config
+# files left after a remove, exit here if called with "purge".
+# This avoids calling userdel again which would cause an error.
+if [ "$1" = "purge" ]; then
+	exit 0;
+fi
+
 I2PUSER=i2psvc
 exec userdel $I2PUSER
 
-- 
GitLab