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