Minor improvements to gen_openapi.sh (#21568)

1) Reduce sleep time - in my experience, 1 second is plenty for a dev
   Vault to start up its HTTP listener - having the user wait for
   5 seconds seems excessive.

2) Comment reason for both sleeps.

3) Remove line of code that is obsolete, now the Enterprise transition
   from stored to autoloaded licenses has completed.
This commit is contained in:
Max Bowsher
2023-07-05 20:31:46 +01:00
committed by GitHub
parent 4f811661f8
commit 8925dc22a0

View File

@@ -24,12 +24,16 @@ then
fi
vault server -dev -dev-root-token-id=root &
sleep 5
VAULT_PID=$!
# Allow time for Vault to start its HTTP listener
sleep 1
defer_stop_vault() {
echo "Stopping Vault..."
kill $VAULT_PID
# Allow time for Vault to print final logging and exit,
# before this script ends, and the shell prints its next prompt
sleep 1
}
@@ -87,8 +91,6 @@ vault secrets enable "transit"
# Enable enterprise features
if [[ -n "${VAULT_LICENSE:-}" ]]; then
vault write sys/license text="${VAULT_LICENSE}"
vault secrets enable "keymgmt"
vault secrets enable "kmip"
vault secrets enable "transform"