forked from mtusi2026/mtusi2026lab7
lab 7 openbao
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
# Operator step after EVERY OpenBao restart (the vault starts sealed). Needs any 2 of the 3 shares.
|
||||
set -eu
|
||||
cd "$(dirname "$0")/.."; . scripts/bao_lib.sh
|
||||
for i in 1 2 3; do
|
||||
baoc status -format=json 2>/dev/null | grep -q "\"sealed\": false" && { echo "OpenBao unsealed"; exit 0; }
|
||||
[ -f "$OPD/unseal-$i" ] && baoc operator unseal "$(cat "$OPD/unseal-$i")" >/dev/null
|
||||
done
|
||||
baoc status -format=json 2>/dev/null | grep -q "\"sealed\": false" && echo "OpenBao unsealed" || { echo "still sealed: need 2 shares" >&2; exit 1; }
|
||||
Reference in New Issue
Block a user