From a1252f33fd53bb407f19fa5a15671d82e1d0dd42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20K=C3=B6mm?= Date: Thu, 28 Sep 2017 21:19:02 +0200 Subject: [PATCH] Added option in case status is not working --- spacestatus.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/spacestatus.sh b/spacestatus.sh index e858144..1a1065e 100755 --- a/spacestatus.sh +++ b/spacestatus.sh @@ -2,11 +2,14 @@ white='\033[0;37m' red='\033[0;31m' green='\033[0;32m' +yellow='\033[0;33m' nocolor='\033[0m' status=$(curl -s http://status.schaffenburg.org) -if [ "$status" == "verriegelt" ]; then -status="${red}closed${nocolor}" -else -status="${green}open${nocolor}" -fi + if [ "$status" == "verriegelt" ]; then + status="${red}closed${nocolor}" + elif [ "$status" == "offen" ]; then + status="${green}open${nocolor}" + else + status="${yellow}not working${nocolor}" + fi echo -e "${white}Spacestatus:${nocolor} $status"