diff options
author | root <root@rshg054.dnsready.net> | 2012-03-19 00:01:09 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-03-19 00:01:09 +0000 |
commit | de5b6982e42f4a1e8b0537cfbc1b676e2a81f195 (patch) | |
tree | 54a8758af5dc5a08f95d12f7fe04cec1d51024a6 /testing/openldap/openldap.install | |
parent | d14a25fc4f65ae3d6e62f4668e9cb88d74834255 (diff) |
Mon Mar 19 00:01:09 UTC 2012
Diffstat (limited to 'testing/openldap/openldap.install')
-rw-r--r-- | testing/openldap/openldap.install | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/testing/openldap/openldap.install b/testing/openldap/openldap.install new file mode 100644 index 000000000..cf3cb9f25 --- /dev/null +++ b/testing/openldap/openldap.install @@ -0,0 +1,20 @@ +post_install(){ + 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 +} |