summaryrefslogtreecommitdiffstats
path: root/krebs/2configs/shack
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2022-11-21 23:55:29 +0100
committerlassulus <lassulus@lassul.us>2022-11-21 23:55:29 +0100
commita8e04485cd0d3bc1c7ff7386a02eeb4c2b2bfe44 (patch)
treefaf71e0e0e76197081119ed47b767107b24294f6 /krebs/2configs/shack
parent953f78184f7fddce66de7a3f6161c9700e51871e (diff)
shack doorstatus: get doorstatus on extra line
Diffstat (limited to 'krebs/2configs/shack')
-rwxr-xr-xkrebs/2configs/shack/doorstatus.sh3
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