From a8e04485cd0d3bc1c7ff7386a02eeb4c2b2bfe44 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 21 Nov 2022 23:55:29 +0100 Subject: shack doorstatus: get doorstatus on extra line --- krebs/2configs/shack/doorstatus.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'krebs/2configs') 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 -- cgit v1.2.3