OpenLDAP-FusionDirectory-Do.../start.sh
2022-01-20 09:54:02 +01:00

18 lines
498 B
Bash

#!/bin/bash
if [ -z "$(ls -A "$CONF_DIR")" ] || [ -z "$(ls -A "$DB_DIR")" ]; then
echo "Reconfigure slapd"
dpkg-reconfigure -plow slapd
echo "Insert fusiondirectory schema"
slapd -F "$CONF_DIR" -u openldap -g openldap -h "$URL" -d "$DEBUG_LEVEL" &
slapd_pid=$!
sleep 2
fusiondirectory-insert-schema
kill -9 "$slapd_pid"
sleep 2
fi
echo "Starting slapd"
slapd -F "$CONF_DIR" -u openldap -g openldap -h "$URL" -d "$DEBUG_LEVEL"
echo "Slapd exited with code $?"