diff options
author | root <root@rshg054.dnsready.net> | 2012-02-18 23:15:35 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-02-18 23:15:35 +0000 |
commit | 1098e9db0acc5bb5c45af5778492faf3b4c99dd6 (patch) | |
tree | 24f65718bdb292fc62194464db8bee1348c48ee5 /community-testing/courier-authlib/courier-authlib.install | |
parent | b31146f2405c7d0f50bcc36b682af46be84cdeb8 (diff) |
Sat Feb 18 23:15:35 UTC 2012
Diffstat (limited to 'community-testing/courier-authlib/courier-authlib.install')
-rw-r--r-- | community-testing/courier-authlib/courier-authlib.install | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/community-testing/courier-authlib/courier-authlib.install b/community-testing/courier-authlib/courier-authlib.install new file mode 100644 index 000000000..cbccc636b --- /dev/null +++ b/community-testing/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 $* |