lab7
Skeleton contracts / contracts (pull_request) Canceled after 0s

This commit is contained in:
2026-11-26 23:34:55 +03:00
parent 20afc2c790
commit a25f357314
167 changed files with 33202 additions and 89 deletions
+15
View File
@@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")/.."
role="${1:?Usage: rotate-service-secret.sh api|worker}"
[[ "$role" == api || "$role" == worker ]] || exit 2
python3 - "$role" <<'PY'
import secrets,sys
from pathlib import Path
for name in ['redis-'+sys.argv[1],'s3-'+sys.argv[1]]:
p=Path('secrets/operator')/name
p.write_text(secrets.token_hex(24));p.chmod(0o600)
PY
scripts/bootstrap-openbao.sh
scripts/dc.sh restart cache
if [[ "$role" == api ]]; then scripts/dc.sh restart api api2; else scripts/dc.sh restart worker; fi