#!/bin/bash

. ${TOOLKIT}-functions.sh

# build index fields list
#
file="ku-indexing.conf"
out="$file.tmp"
buf="index "
comma=

for fld in $(jtconf ldap.indexing_fields_eq)
do
	buf="$buf$comma$fld"
	comma=","
done
buf="$buf eq"

cat $file >$out
echo "$buf" >>$out

# 2023-03-05 lc
# - on fresh systems /etc/ldap doesn't exists, or have broken perms

[ -d /etc/ldap ] || mkdir /etc/ldap
chmod 775 /etc/ldap

exit 0
