diff options
author | lassulus <lassulus@lassul.us> | 2022-11-21 23:55:29 +0100 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2022-11-21 23:55:29 +0100 |
commit | a8e04485cd0d3bc1c7ff7386a02eeb4c2b2bfe44 (patch) | |
tree | faf71e0e0e76197081119ed47b767107b24294f6 /krebs/2configs/shack | |
parent | 953f78184f7fddce66de7a3f6161c9700e51871e (diff) |
shack doorstatus: get doorstatus on extra line
Diffstat (limited to 'krebs/2configs/shack')
-rwxr-xr-x | krebs/2configs/shack/doorstatus.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/krebs/2configs/shack/doorstatus.sh b/krebs/2configs/shack/doorstatus.sh index 46314cb9c..aa6c1c3d1 100755 --- a/krebs/2configs/shack/doorstatus.sh +++ b/krebs/2configs/shack/doorstatus.sh @@ -54,7 +54,8 @@ Herr makefu an Kasse 3 bitte, Kasse 3 bitte Herr makefu. Der API Computer ist ma EOF ) -state=$(curl -fSsk https://api.shackspace.de/v1/space | jq .doorState.open) +payload=$(curl -fSsk https://api.shackspace.de/v1/space) +state=$(printf '%s' "$payload" | jq .doorState.open) prevstate=$(cat state ||:) if test "$state" == "$(cat state)";then |