shack doorstatus: get doorstatus on extra line

This commit is contained in:
lassulus 2022-11-21 23:55:29 +01:00
parent 953f78184f
commit a8e04485cd

View File

@ -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