go-ethereum/.github/scripts/stop-ecs-task.sh
Will Meister fa42b78228
Adding CD to geth (#11)
* Adding CD to geth
2020-08-06 12:22:33 -05:00

17 lines
404 B
Bash
Executable File

#!/bin/bash
if [ "$#" -ne 2 ]; then
echo "Invalid number of arguments. Usage: stop-ecs-task.sh <cluster> <service>"
exit 1
fi
cluster=$1
service=$2
tasks=$(aws ecs list-tasks --cluster $cluster --service-name $service)
task_arn=$(echo $tasks | awk -F\[ '{print $2}' | awk -F\" '{print $2}')
if [ -n "${task_arn}" ]; then
aws ecs stop-task --cluster $cluster --task $task_arn > /dev/null
fi