LDIF_DB_FILE=/container/service/slapd/assets/config/bootstrap/ldif/db.ldif LDIF_SCHEMA_FILE=/container/service/slapd/assets/config/bootstrap/ldif/schema.ldif domain=$1 password=$2 echo "Using domain $1 and password $2" hashed_ldap_passwd="$(slappasswd -s $password)" sed -i 's|dc=example,dc=net|'"$domain"'|g' $LDIF_DB_FILE $LDIF_SCHEMA_FILE sed -i 's|FILL_IT|'"$hashed_ldap_passwd"'|g' $LDIF_DB_FILE $LDIF_SCHEMA_FILE