20 lines
447 B
Plaintext
20 lines
447 B
Plaintext
|
post_install() {
|
||
|
if [ "$(getent group ldap | cut -d ":" -f 3)" != "83" ]; then
|
||
|
groupadd -g 83 ldap
|
||
|
fi
|
||
|
if [ "$(getent passwd ldap | cut -d ":" -f 3)" != "83" ]; then
|
||
|
useradd -c 'OpenLDAP Daemon Owner' \
|
||
|
-d /var/lib/openldap -u 83 \
|
||
|
-g ldap -s /bin/false ldap
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
post_upgrade() {
|
||
|
post_install
|
||
|
}
|
||
|
|
||
|
post_remove() {
|
||
|
groupdel ldap 2>/dev/null || true
|
||
|
userdel ldap 2>/dev/null || true
|
||
|
}
|