From 3026bb55941e3b04b56f5fb41b88941c6c2ce0cd Mon Sep 17 00:00:00 2001 From: root Date: Fri, 4 Nov 2011 23:14:51 +0000 Subject: Fri Nov 4 23:14:51 UTC 2011 --- testing/openldap/openldap.install | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 testing/openldap/openldap.install (limited to 'testing/openldap/openldap.install') 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 +} -- cgit v1.2.3-54-g00ecf