summaryrefslogtreecommitdiff
path: root/hosted-kolab/13-add-hosted-domain-with-external-ldap.sh
diff options
context:
space:
mode:
Diffstat (limited to 'hosted-kolab/13-add-hosted-domain-with-external-ldap.sh')
-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}"
+