Pull admin token from config
Signed-off-by: James Ketrenos <james_eikona@ketrenos.com>
This commit is contained in:
parent
46cfa0f92b
commit
32aedaa6ca
11
server/kick
11
server/kick
@ -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}" \
|
||||
|
Loading…
x
Reference in New Issue
Block a user