feat: add runtime secrets generation to setup_credentials
Some checks failed
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled

- Added call to load-keystore-secrets.sh in setup_credentials function
- Generates /run/aitbc/secrets/.env during setup
- Required by blockchain-node and blockchain-rpc systemd services
- Added error handling if secrets generation fails
- Prevents service startup failures due to missing runtime secrets
- Fixes hermes setup stumble where services failed to start
This commit is contained in:
aitbc
2026-05-26 10:28:26 +02:00
parent 6006550938
commit 2a0bca6d98

View File

@@ -386,6 +386,17 @@ setup_credentials() {
log "Added API_KEY_HASH_SECRET to .env"
fi
# Generate runtime secrets file for systemd services
log "Generating runtime secrets file..."
if [ -f "/opt/aitbc/scripts/utils/load-keystore-secrets.sh" ]; then
/opt/aitbc/scripts/utils/load-keystore-secrets.sh || {
warning "Failed to generate runtime secrets file"
warning "Services may fail to start without /run/aitbc/secrets/.env"
}
else
warning "load-keystore-secrets.sh not found, skipping runtime secrets generation"
fi
success "Secure credentials setup completed"
}