Intial checkin, shack-open.sh

This commit is contained in:
2026-01-21 13:28:27 +01:00
parent 51b8c08f3c
commit 6fcb47c5bc

13
linux/shack-open.sh Executable file
View File

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