summaryrefslogtreecommitdiff
path: root/hosted-kolab
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-09-15 11:06:39 (GMT)
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-09-15 11:07:40 (GMT)
commit23de67dfa85f1833b621854c04dd8335dfd3f644 (patch)
treee7d68e887fd11774ec0b72502251a6a7e51cdfd6 /hosted-kolab
parented30bbeba26b0c39f075a4d10c9d38869cf9b123 (diff)
downloadkolab-scripts-23de67dfa85f1833b621854c04dd8335dfd3f644.tar.gz
Add some standalone ldap initialization scripts
Add a script to add a domain name space with external LDAP
Diffstat (limited to 'hosted-kolab')
-rwxr-xr-xhosted-kolab/13-add-hosted-domain-with-external-ldap.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/hosted-kolab/13-add-hosted-domain-with-external-ldap.sh b/hosted-kolab/13-add-hosted-domain-with-external-ldap.sh
new file mode 100755
index 0000000..0109792
--- /dev/null
+++ b/hosted-kolab/13-add-hosted-domain-with-external-ldap.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+ . ./settings.sh
+
+if [ $# -ne 1 ]; then
+ read -p "Domain name space: " $domain_name_space
+else
+ domain_name_space=$1
+fi
+
+(
+ echo "dn: associateddomain=${domain_name_space},cn=kolab,cn=config"
+ echo "objectclass: top"
+ echo "objectclass: domainrelatedobject"
+ echo "associateddomain: ${domain_name_space}"
+ if [ ! -z "$2" ]; then
+ echo "inetdomainbasedn: $2"
+ fi
+ echo ""
+) | ldapadd -x -h ${ldap_host} -D "${ldap_binddn}" -w "${ldap_bindpw}"
+