summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2015-01-25 11:06:58 (GMT)
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2015-01-25 11:06:58 (GMT)
commit70f0fdaef03313465ded433c4b15f6f047b275ec (patch)
treeddffb1c31ebf1518ffa43aa36d0dc699e83862d1
parentb59c99013c570c1ac9fc137b05dc621d2abc886e (diff)
downloadkolab-scripts-70f0fdaef03313465ded433c4b15f6f047b275ec.tar.gz
Add a VLV indexing task for the domains VLV
-rwxr-xr-xpopulate-ldap/10c-run-vlv-index-tasks.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/populate-ldap/10c-run-vlv-index-tasks.sh b/populate-ldap/10c-run-vlv-index-tasks.sh
index 7a971a8..5efceb1 100755
--- a/populate-ldap/10c-run-vlv-index-tasks.sh
+++ b/populate-ldap/10c-run-vlv-index-tasks.sh
@@ -103,4 +103,37 @@ while [ ${ldap_complete} -ne 1 ]; do
fi
done
+if [ "${domain_base_dn}" != "cn=kolab,cn=config" ]; then
+ (
+ echo "dn: cn=DVI,cn=index,cn=tasks,cn=config"
+ echo "objectclass: top"
+ echo "objectclass: extensibleObject"
+ echo "cn: DVI"
+ echo "nsinstance: ${domain_db}"
+ echo "nsIndexVLVAttribute: DVI"
+ echo ""
+ ) | ldapmodify -a -x -h ${ldap_host} -D "${ldap_binddn}" -w "${ldap_bindpw}" -c
+
+ ldap_complete=0
+ while [ ${ldap_complete} -ne 1 ]; do
+ result=$(
+ ldapsearch \
+ -x \
+ -h ${ldap_host} \
+ -D "${ldap_binddn}" \
+ -w "${ldap_bindpw}" \
+ -c \
+ -LLL \
+ -b "cn=DVI,cn=index,cn=tasks,cn=config" \
+ -s base 2>/dev/null
+ )
+ if [ -z "$result" ]; then
+ ldap_complete=1
+ echo ""
+ else
+ echo -n "."
+ sleep 1
+ fi
+ done
+fi