forked from mtusi2026/mtusi2026lab7
This commit is contained in:
@@ -20,14 +20,17 @@ if [ ! -f "$repo_dir/.runtime/security/openbao/tls.crt" ]; then
|
||||
fi
|
||||
|
||||
"$script_dir/openbao-seed.sh" "$env_file"
|
||||
"$script_dir/sync-docker-workspace.sh"
|
||||
compose up -d security-bootstrap openbao-permissions openbao
|
||||
openbao_address=$(compose port openbao 8200)
|
||||
BAO_ADDR="https://$openbao_address"
|
||||
if [ -z "${BAO_ADDR:-}" ]; then
|
||||
openbao_address=$(compose port openbao 8200)
|
||||
BAO_ADDR="https://$openbao_address"
|
||||
fi
|
||||
BAO_CACERT="$repo_dir/.runtime/security/openbao/ca.crt"
|
||||
export BAO_ADDR BAO_CACERT ENV_FILE="$env_file"
|
||||
|
||||
remaining=60
|
||||
until curl --silent --show-error --cacert "$BAO_CACERT" \
|
||||
until curl --silent --show-error --connect-timeout 2 --max-time 3 --cacert "$BAO_CACERT" \
|
||||
--output /dev/null "$BAO_ADDR/v1/sys/health"; do
|
||||
remaining=$((remaining - 1))
|
||||
[ "$remaining" -gt 0 ] || {
|
||||
@@ -40,7 +43,7 @@ done
|
||||
ENV_FILE="$env_file" "$script_dir/openbao-init.sh"
|
||||
ENV_FILE="$env_file" "$script_dir/openbao-unseal.sh"
|
||||
remaining=60
|
||||
until curl --fail --silent --show-error --cacert "$BAO_CACERT" \
|
||||
until curl --fail --silent --show-error --connect-timeout 2 --max-time 3 --cacert "$BAO_CACERT" \
|
||||
--output /dev/null "$BAO_ADDR/v1/sys/health"; do
|
||||
remaining=$((remaining - 1))
|
||||
[ "$remaining" -gt 0 ] || {
|
||||
|
||||
Reference in New Issue
Block a user