summaryrefslogtreecommitdiff
path: root/security/drweb-sendmail/pkg-deinstall
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2001-10-19 11:08:01 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2001-10-19 11:08:01 +0000
commitafd6dfcd464033aa5ed809f2fe11a32c44de2240 (patch)
tree21d6df05c31ec7a35f9ed2f21ea635eceaccb811 /security/drweb-sendmail/pkg-deinstall
parentMove user creation/deletion to pkg-*install (diff)
Move user adding/deleting to pkg*install
Notes
Notes: svn path=/head/; revision=48934
Diffstat (limited to 'security/drweb-sendmail/pkg-deinstall')
-rw-r--r--security/drweb-sendmail/pkg-deinstall22
1 files changed, 22 insertions, 0 deletions
diff --git a/security/drweb-sendmail/pkg-deinstall b/security/drweb-sendmail/pkg-deinstall
new file mode 100644
index 000000000000..fe71e9e62b5e
--- /dev/null
+++ b/security/drweb-sendmail/pkg-deinstall
@@ -0,0 +1,22 @@
+#!/bin/sh
+# $FreeBSD$
+#
+
+if [ "$2" != "POST-DEINSTALL" ]; then
+ exit 0
+fi
+
+USER=drweb
+ex=0
+
+if pw usershow "${USER}" 2>/dev/null 1>&2; then
+ if pw userdel ${USER}; then
+ echo "Delete user/group \"${USER}\"."
+ else
+ echo "Deleting user/group \"${USER}\" failed..."
+ ex=1
+ fi
+fi
+
+[ "$ex" = "1" ] && exit 1
+exit 0