|
#!/bin/bash
|
|
ADDRESS="brutus"
|
|
PORT="8081"
|
|
|
|
if [ "$#" -ne 1 ]; then
|
|
echo "USAGE: hbkcd_remove <queue position>"
|
|
exit -1
|
|
fi
|
|
|
|
# Make sure curl ad jq are installed
|
|
command -v curl >/dev/null 2>&1 || { echo >&2 "Please install curl to use this script. Aborting."; exit 1; }
|
|
command -v jq >/dev/null 2>&1 || { echo >&2 "Please install jq to use this script. Aborting."; exit 1; }
|
|
|
|
curl -s -X POST -d '{"type": "remove", "position": "'$1'"}' http://$ADDRESS:$PORT/command | jq
|