mirror of
https://github.com/luzifer-docker/vault-self-unseal.git
synced 2024-12-20 07:01: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)
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue