blob: a34ca1a10967b064e3f088954f405d5fd226369d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
post_install(){
systemd-tmpfiles --create slapd.conf
groupadd -g 439 ldap &>/dev/null
useradd -u 439 -g ldap -d /var/lib/openldap -s /bin/false ldap &>/dev/null
chown -R ldap:ldap var/lib/openldap &>/dev/null
}
post_upgrade(){
getent group ldap >/dev/null 2>&1 || groupadd -g 439 ldap &>/dev/null
getent passwd ldap >/dev/null 2>&1 || useradd -u 439 -g ldap -d /var/lib/openldap -s /bin/false ldap &>/dev/null
chown -R ldap:ldap var/lib/openldap &>/dev/null
}
post_remove(){
if getent passwd ldap >/dev/null 2>&1; then
userdel ldap
fi
if getent group ldap >/dev/null 2>&1; then
groupdel ldap
fi
}
|