#!/bin/sh | |
set -e | |
{ | |
db_secret=/tmp/passwd/db/secret | |
i=0 | |
while [ -z "$(cat ${db_secret} 2>/dev/null)" ]; do | |
if [ ${i} -eq 10 ]; then | |
echo "ERROR: No password file after ${i}s." | |
exit 1 | |
fi | |
sleep 1 | |
i=$((i+1)) | |
done | |
export KC_DB_PASSWORD=$(cat ${db_secret}) | |
} | |
exec /opt/keycloak/bin/kc.sh "$@" |