15 lines
325 B
Bash
Executable file
15 lines
325 B
Bash
Executable file
#!/bin/bash
|
|
ID=${1:-1}
|
|
LEVEL=${2:-65280}
|
|
COMMAND=set_level
|
|
DATA='{"id":"'$ID'", "command":"'$COMMAND'", "data":{"level":"'$LEVEL'"}}'
|
|
|
|
REQ=POST
|
|
URL=http://localhost:5000/actor/command
|
|
echo "$REQ $URL --> $DATA"
|
|
read -p "continue?" -n 1 cont
|
|
curl \
|
|
-X $REQ $URL \
|
|
-H "Content-Type: application/json" \
|
|
-d "$DATA"
|
|
|