diff options
author | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
---|---|---|
committer | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
commit | 415856bdd4f48ab4f2732996f0bae58595092bbe (patch) | |
tree | ede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/courier-authlib/courier-authlib.install |
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/courier-authlib/courier-authlib.install')
-rw-r--r-- | community/courier-authlib/courier-authlib.install | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/community/courier-authlib/courier-authlib.install b/community/courier-authlib/courier-authlib.install new file mode 100644 index 000000000..cbccc636b --- /dev/null +++ b/community/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 $* |