olcRootPW is always rehashed if the container starts.
Instead of
if [[ -f "$WAS_ADMIN_PASSWORD_SET" ]]; then
...
else
touch "$WAS_ADMIN_PASSWORD_SET"
fi
the logic should be
if [[ ! -f "$WAS_ADMIN_PASSWORD_SET" ]]; then
...
touch "$WAS_ADMIN_PASSWORD_SET"
fi
to also allow to delete plain text password in LDAP_ADMIN_PASSWORD from .env after initialisation.
I patched the startup.sh in my environment and it works as intended.