| Nico Huber | f4fbab5 | 2023-07-25 10:57:08 +0000 | [diff] [blame^] | 1 | #!/bin/sh |
| 2 | |||||
| 3 | set -e | ||||
| 4 | |||||
| 5 | { | ||||
| 6 | db_secret=/tmp/passwd/db/secret | ||||
| 7 | |||||
| 8 | i=0 | ||||
| 9 | while [ -z "$(cat ${db_secret} 2>/dev/null)" ]; do | ||||
| 10 | if [ ${i} -eq 10 ]; then | ||||
| 11 | echo "ERROR: No password file after ${i}s." | ||||
| 12 | exit 1 | ||||
| 13 | fi | ||||
| 14 | sleep 1 | ||||
| 15 | i=$((i+1)) | ||||
| 16 | done | ||||
| 17 | |||||
| 18 | export KC_DB_PASSWORD=$(cat ${db_secret}) | ||||
| 19 | } | ||||
| 20 | |||||
| 21 | exec /opt/keycloak/bin/kc.sh "$@" | ||||