1
0
James Ketrenos fd2795892f Updating to working state
Signed-off-by: James Ketrenos <james_eikona@ketrenos.com>
2022-01-28 21:52:55 -08:00

23 lines
523 B
Bash
Executable File

#!/bin/bash
ADMIN=$(jq -r .admin config/local.json)
if [[ "${ADMIN}" == "" ]]; then
echo "You need to set your { 'admin': 'secret' } in config/local.json"
exit 1
fi
id=$1
color=$2
if [[ "${id}" == "" ]] || [[ "${color}" == "" ]]; then
echo "Usage: kick GAME-ID red|white|blue|orange"
exit 1
fi
curl --noproxy '*' -s -L \
--request PUT \
--header "PRIVATE-TOKEN: ${ADMIN}" \
--header "Content-Type: application/json" \
http://localhost:8930/ketr.ketran/api/v1/games/${id}/kick/${color} |
jq -r .status