From 1e1e4927b05d9b242bfe83794e3a98ab2c8f79ef Mon Sep 17 00:00:00 2001 From: root Date: Wed, 23 Nov 2011 23:15:26 +0000 Subject: Wed Nov 23 23:15:26 UTC 2011 --- .../courier-authlib/courier-authlib.install | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 community-staging/courier-authlib/courier-authlib.install (limited to 'community-staging/courier-authlib/courier-authlib.install') diff --git a/community-staging/courier-authlib/courier-authlib.install b/community-staging/courier-authlib/courier-authlib.install new file mode 100644 index 000000000..cbccc636b --- /dev/null +++ b/community-staging/courier-authlib/courier-authlib.install @@ -0,0 +1,32 @@ +# arg 1: the new package version +post_install() { + # creates group and user on virgin systems + if [ -z "`grep '^courier::' /etc/group`" ]; then + groupadd -g 72 courier >& /dev/null + fi + if [ -z "`grep '^courier:' /etc/passwd`" ]; then + useradd -u 72 -d /var/spool/courier -g courier -s /bin/false courier &>/dev/null + fi +} + +# arg 1: the new package version +# arg 2: the old package version +post_upgrade() { + post_install $1 +} + +# arg 1: the old package version +pre_remove() { + userdel courier &> /dev/null + groupdel courier &> /dev/null +} + + +post_remove() { + /bin/true +} + +op=$1 +shift + +$op $* -- cgit v1.2.3-54-g00ecf