OpenLDAP-FusionDirectory-Do.../start.sh

19 lines
498 B
Bash
Raw Normal View History

2022-01-20 09:53:06 +01:00
#!/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 $?"