summaryrefslogtreecommitdiff
path: root/testing/openldap/openldap.install
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2011-09-22 23:14:43 +0000
committerroot <root@rshg054.dnsready.net>2011-09-22 23:14:43 +0000
commit919a63ffc80158b2a5610fa87eb51fd5f8f724ba (patch)
treec33a4966d6efeeb95d903135603c9a402e0d22cb /testing/openldap/openldap.install
parentb7f839da11975b9f2a964a82d591b7a8628f0931 (diff)
Thu Sep 22 23:14:43 UTC 2011
Diffstat (limited to 'testing/openldap/openldap.install')
-rw-r--r--testing/openldap/openldap.install20
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
+}