From 5271dbbaebd85acabbe998c2c31b30ba1be04d4d Mon Sep 17 00:00:00 2001 From: Pavel Dmitriev <90725813+PavelMXFox@users.noreply.github.com> Date: Thu, 16 Dec 2021 17:45:09 +0300 Subject: [PATCH] Added ls-fail check --- check/check.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/check/check.sh b/check/check.sh index 4b2ea29..41de03c 100755 --- a/check/check.sh +++ b/check/check.sh @@ -6,7 +6,16 @@ DIRECTORY=`dirname "$ABSOLUTE_FILENAME"` source ${DIRECTORY}/config currStamp=`date +%s` -for backup_dir in `ls -d ${prefix}/backup-*` +list=`ls -d ${prefix}/backup-*` + +if [ "$?" != 0 ] +then + echo "FAIL - Directory listnig failed!" + exit +fi + + +for backup_dir in ${list} do echo Directory ${backup_dir}: lastFull=`cd ${backup_dir}/ && ls -t *-[F].t* 2>/dev/null | head -n 1`