mirror of
https://github.com/luzifer-docker/vault-self-unseal.git
synced 2024-12-20 23:21:18 +00:00
Do not crash on no token
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
2632df1559
commit
e8c6007647
1 changed files with 6 additions and 1 deletions
|
@ -32,6 +32,11 @@ function main() {
|
||||||
export VAULT_TOKEN=$(authenticate)
|
export VAULT_TOKEN=$(authenticate)
|
||||||
UNSEAL_TOKEN=$(getUnsealKey || echo "")
|
UNSEAL_TOKEN=$(getUnsealKey || echo "")
|
||||||
|
|
||||||
|
[ -z "${UNSEAL_TOKEN}"] && {
|
||||||
|
echo "No unseal token found, waiting..."
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
unseal "${UNSEAL_TOKEN}"
|
unseal "${UNSEAL_TOKEN}"
|
||||||
|
|
||||||
isSealed && {
|
isSealed && {
|
||||||
|
|
Loading…
Reference in a new issue