feat: complete lab 7 for grade 4

This commit is contained in:
sashadugina06
2026-12-04 13:55:32 +03:00
parent 20afc2c790
commit 11390b65fd
91 changed files with 10163 additions and 50 deletions
+14
View File
@@ -0,0 +1,14 @@
#!/bin/sh
set -eu
cd "$(dirname "$0")/.."
: "${TARGET_INSTANCE_ID:?target API instance required}"
for service in api-a api-b; do
actual=$(./scripts/compose.sh exec -T "$service" python /app/uds_probe.py live) || continue
if [ "$actual" = "$TARGET_INSTANCE_ID" ]; then
if [ -n "${STOP_ONE_EVIDENCE:-}" ]; then
printf '%s\n' "$service" > "$STOP_ONE_EVIDENCE"
fi
exec ./scripts/compose.sh stop -t 2 "$service"
fi
done
exit 1