Browse Source

fix to prevent wiki edits every minute, when status is finally unknown

master
root 3 years ago
parent
commit
654bbf47bc
  1. 5
      chch-status.sh

5
chch-status.sh

@ -65,20 +65,23 @@ case $STATUS in
API_STATUS="null"
STATUS_="'''Öffnungsstatus unbekannt'''"
IMAGE="$WIKI_IMAGE_CLOSED"
WIKI_STATUS_SINCE=""
if [ -f "$STATUS_FILE" ]; then
case $(head -n1 "$STATUS_FILE") in
$STATUS_OPEN)
STATUS_="'''unbekannt'''<br>zuletzt&nbsp;war&nbsp;$STATUS_OPEN"
IMAGE="$WIKI_IMAGE_OPEN"
WIKI_STATUS_SINCE="<br>seit&nbsp;$TIMESTAMP_LASTCHANGE_DATE"
;;
$STATUS_CLOSED)
STATUS_="'''unbekannt'''<br>zuletzt&nbsp;war&nbsp;$STATUS_CLOSED"
IMAGE="$WIKI_IMAGE_CLOSED"
WIKI_STATUS_SINCE="<br>seit&nbsp;$TIMESTAMP_LASTCHANGE_DATE"
;;
esac
fi
API_STATUS_MSG="$STATUS_MSG_CLOSED"
WIKI_STATUS="{{Noframeright|[[File:$IMAGE|link=]]|$STATUS_<br>seit&nbsp;$TIMESTAMP_LASTCHANGE_DATE}}"
WIKI_STATUS="{{Noframeright|[[File:$IMAGE|link=]]|${STATUS_}$WIKI_STATUS_SINCE}}"
;;
esac

Loading…
Cancel
Save