mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-30 18:17:55 +00:00
19 lines
297 B
Bash
Executable File
19 lines
297 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Copyright (c) HashiCorp, Inc.
|
|
# SPDX-License-Identifier: BUSL-1.1
|
|
set -uo pipefail
|
|
|
|
tries=5
|
|
count=0
|
|
|
|
until "$@"
|
|
do
|
|
if [ $count -eq $tries ]; then
|
|
echo "tried $count times, exiting"
|
|
exit 1
|
|
fi
|
|
((count++))
|
|
echo "trying again, attempt $count"
|
|
sleep $count
|
|
done
|