1
0

Pull admin token from config

Signed-off-by: James Ketrenos <james_eikona@ketrenos.com>
This commit is contained in:
James Ketrenos 2022-01-28 14:39:13 -08:00
parent 46cfa0f92b
commit 32aedaa6ca

View File

@ -1,9 +1,18 @@
#!/bin/bash
ADMIN="ui2qNb8PYo6NaPVcLuFXx2nQD6U7Alsm"
ADMIN=$(jq .admin config/local.json)
if [[ "${ADMIN}" == "" ]]; then
echo "You need to set your { 'admin': 'secret' } in config/local.json"
exit 1
fi
id=$1
user=$2
if [[ "${id}" == "" ]] || [[ "${user}" == "" ]]; then
echo "Usage: kick GAME-ID USER-NAME"
exit 1
fi
curl --noproxy '*' -s -L \
--request PUT \
--header "PRIVATE-TOKEN: ${ADMIN}" \