From f53eda75b03b9d01b3afef2b6d4f7c65ca80b27a Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Tue, 24 Nov 2015 13:03:58 +0100 Subject: [PATCH] backup-status: Enhance status message --- bin/backup-status | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/backup-status b/bin/backup-status index 68a7d1f..6d61739 100755 --- a/bin/backup-status +++ b/bin/backup-status @@ -208,12 +208,17 @@ for f in $sys; do echo done +if [ "$ONLY_ERRORS" != "0" ]; then + status="failed "; p0="."; pN="!" +else + status=""; p0="!"; pN="." +fi if [ $count -lt 1 ]; then - echo "No backups found!" + echo "No ${status}backups found${p0}" exit 1 fi [ $count -eq 1 ] && sc="" || sc="s" [ $snapshots -eq 1 ] && ss="" || ss="s" -echo "$count system backup$sc found, $snapshots snapshot$ss." +echo "$count ${status}system backup$sc found, $snapshots snapshot$ss${pN}" # -eof- -- 2.39.2