From e8c600764779fa05e9593fb773c0d3bcc20e8430 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Wed, 30 May 2018 14:38:19 +0200 Subject: [PATCH] Do not crash on no token Signed-off-by: Knut Ahlers --- entrypoint.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index b5715fb..0677f21 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -32,6 +32,11 @@ function main() { export VAULT_TOKEN=$(authenticate) UNSEAL_TOKEN=$(getUnsealKey || echo "") + [ -z "${UNSEAL_TOKEN}"] && { + echo "No unseal token found, waiting..." + return 0 + } + unseal "${UNSEAL_TOKEN}" isSealed && { @@ -47,5 +52,5 @@ function unseal() { while [ 1 ]; do main - sleep 10 + sleep 10 done