Files
mtusi2026lab3/scripts/stop-one.sh

9 lines
351 B
Bash

#!/usr/bin/env bash
# ACTION_SCRIPT for make test-failover: stop EXACTLY the replica named by test.
set -euo pipefail
cd "$(dirname "$0")/.."
case "${TARGET_INSTANCE_ID:-}" in
api1|api2) docker compose --env-file .env stop -t 1 "$TARGET_INSTANCE_ID" >/dev/null ;;
*) echo "Unexpected TARGET_INSTANCE_ID; expected api1 or api2" >&2; exit 2 ;;
esac