From 6fcb47c5bcf35e88dded511ea52bbda47e67d4de Mon Sep 17 00:00:00 2001 From: Jens Franik Date: Wed, 21 Jan 2026 13:28:27 +0100 Subject: [PATCH] Intial checkin, shack-open.sh --- linux/shack-open.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 linux/shack-open.sh diff --git a/linux/shack-open.sh b/linux/shack-open.sh new file mode 100755 index 0000000..6761a9c --- /dev/null +++ b/linux/shack-open.sh @@ -0,0 +1,13 @@ + +state=$(curl -s 'https://api.shackspace.de/v1/space' | w3m -dump -T text/html | tr '[}{]' '\n' | tr -d '"' | grep ^open | cut -d':' -f2) +if [ "$state" == 'true' ] +then + echo "Shack is OPEN" +elif [ "$state" == 'false' ] +then + echo "Shack is closed" +else + echo "Shack unknown State: $state" +fi + +