#!/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 $?"