summaryrefslogtreecommitdiff
path: root/community/courier-authlib/courier-authlib.install
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-06-10 00:04:00 +0000
committerroot <root@rshg054.dnsready.net>2012-06-10 00:04:00 +0000
commit7b2739f21a7ed0d52497fa381c9a2383e71ab7a8 (patch)
treee92096f88e034d79e6f814971f98eb098c0abd80 /community/courier-authlib/courier-authlib.install
parent0c7e29df5c6742895884a0bbcf86381f8e601782 (diff)
Sun Jun 10 00:04:00 UTC 2012
Diffstat (limited to 'community/courier-authlib/courier-authlib.install')
-rw-r--r--community/courier-authlib/courier-authlib.install26
1 files changed, 10 insertions, 16 deletions
diff --git a/community/courier-authlib/courier-authlib.install b/community/courier-authlib/courier-authlib.install
index cbccc636b..7b29f845f 100644
--- a/community/courier-authlib/courier-authlib.install
+++ b/community/courier-authlib/courier-authlib.install
@@ -1,12 +1,15 @@
# 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
+ if ! getent group courier >/dev/null; then
+ groupadd -g 72 courier >/dev/null 2>&1
fi
- if [ -z "`grep '^courier:' /etc/passwd`" ]; then
- useradd -u 72 -d /var/spool/courier -g courier -s /bin/false courier &>/dev/null
+
+ if getent passwd courier >/dev/null; then
+ useradd -u 72 -d /var/spool/courier -g courier -s /bin/false courier >/dev/null 2>&1
fi
+
+ systemd-tmpfiles --create /usr/lib/tmpfiles/courier-authlib.conf
}
# arg 1: the new package version
@@ -17,16 +20,7 @@ post_upgrade() {
# arg 1: the old package version
pre_remove() {
- userdel courier &> /dev/null
- groupdel courier &> /dev/null
-}
-
-
-post_remove() {
- /bin/true
-}
-
-op=$1
-shift
+ userdel courier
+ groupdel courier
+} >/dev/null 2>&1
-$op $*