mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-12-08 23:03:46 +00:00
31 lines
754 B
Text
31 lines
754 B
Text
# arg 1: the new package version
|
|
post_install() {
|
|
if [ -z "`grep '^postgrey::' /etc/group`" ]; then
|
|
groupadd -g 314 postgrey >& /dev/null
|
|
fi
|
|
if [ -z "`grep '^postgrey:' /etc/passwd`" ]; then
|
|
useradd -u 314 -d /var/spool/postfix/postgrey -g postgrey -s /bin/false postgrey
|
|
else
|
|
# (postgrey should have no shell, but may have been added by others in the past)
|
|
usermod -s /bin/false postgrey
|
|
fi
|
|
|
|
chown postgrey:postgrey /var/spool/postfix/postgrey
|
|
}
|
|
|
|
# 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 postgrey &> /dev/null
|
|
groupdel postgrey &> /dev/null
|
|
}
|
|
|
|
op=$1
|
|
shift
|
|
|
|
$op $*
|