mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-05 19:57:16 +08:00
30 lines
816 B
Plaintext
30 lines
816 B
Plaintext
# arg 1: the new package version
|
|
post_install() {
|
|
if [ -z "`grep '^rbldns::' /etc/group`" ]; then
|
|
groupadd -g 58 rbldns >& /dev/null
|
|
fi
|
|
if [ -z "`grep '^rbldns:' /etc/passwd`" ]; then
|
|
useradd -u 58 -d /var/lib/rbldns -g rbldns -s /bin/false rbldns
|
|
fi
|
|
if [ -z "`grep '^rbldnszones::' /etc/group`" ]; then
|
|
groupadd -g 59 rbldnszones >& /dev/null
|
|
fi
|
|
if [ -z "`grep '^rbldnszones:' /etc/passwd`" ]; then
|
|
useradd -u 59 -d /var/lib/rbldns -g rbldnszones -s /bin/false rbldnszones
|
|
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 rbldns &> /dev/null
|
|
groupdel rbldns &> /dev/null
|
|
userdel rbldnszones &> /dev/null
|
|
groupdel rbldnszones &> /dev/null
|
|
}
|