Fix colours in check mode

This commit is contained in:
Rob Pearce 2020-11-09 09:37:31 +11:00
parent a8e4f54266
commit 703c353c1b
1 changed files with 5 additions and 5 deletions

10
bare.sh
View File

@ -989,14 +989,14 @@ for f in $REPO_LIST; do
if [[ $TELEGRAM -eq 1 ]]; then
echo "**OK**: Last backup for __${REPO}__ succeeded on $humanstamp."
else
cecho "$GREEN" "OK: Last backup for __${REPO}__ succeeded on $humanstamp."
cecho "$GREEN" "OK: Last backup for $BOLD${REPO}$PLAIN$GREEN succeeded on $humanstamp."
fi
rv=0
else
if [[ $TELEGRAM -eq 1 ]]; then
echo "**CRITICAL**: Last backup for __${REPO}__ succeeded on $humanstamp (age $age not in last 24 hours)."
else
cecho "$RED" "CRITICAL: Last backup for __${REPO}__ succeeded on $humanstamp (age $age not in last 24 hours)."
cecho "$RED" "CRITICAL: Last backup for $BOLD${REPO}${PLAIN}${RED} succeeded on $humanstamp (age $age not in last 24 hours)."
fi
errcount=$(( $errcount + 1))
rv=2
@ -1005,16 +1005,16 @@ for f in $REPO_LIST; do
if [[ $TELEGRAM -eq 1 ]]; then
echo "**CRITICAL**: Last backup for __${REPO}__ failed on $humanstamp."
else
cecho "$RED" "CRITICAL: Last backup for __${REPO}__ failed on $humanstamp."
cecho "$RED" "CRITICAL: Last backup for $BOLD${REPO}$PLAIN$RED failed on $humanstamp."
fi
rv=2
errcount=$(( $errcount + 1))
fi
else
if [[ $TELEGRAM -eq 1 ]]; then
echo "**WARNING**: No history found for repo '$REPO'"
echo "**WARNING**: No history found for repo __${REPO}__"
else
cecho "$YELLOW" "WARNING: No history found for repo '$REPO'"
cecho "$YELLOW" "WARNING: No history found for repo $BOLD$REPO$PLAIN$YELLOW'"
fi
rv=1
warncount=$(( $warncount + 1))