15 lines
303 B
Bash
Executable File
15 lines
303 B
Bash
Executable File
#!/bin/bash -e
|
|
|
|
source $(dirname $0)/shelly.conf
|
|
|
|
id=1
|
|
|
|
curl -s -X POST \
|
|
-d '{"id":1, "method":"Script.Eval", "params":{"id":'$SCRIPT_ID', "code":"'$@'"}}' \
|
|
$SHELLY_RPC > .inspect.json
|
|
|
|
cat .inspect.json | jq .error.message
|
|
cat .inspect.json | jq .result.result -r | jq .
|
|
|
|
rm -f .inspect.json
|