From 66b3c450b0de65ace1602c1008955070b47ca8b5 Mon Sep 17 00:00:00 2001 From: Rob Pearce Date: Thu, 14 Mar 2019 12:25:23 +1100 Subject: [PATCH] Fix check for empty datapath --- bare.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bare.sh b/bare.sh index a62c070..7a4cb6a 100755 --- a/bare.sh +++ b/bare.sh @@ -11,7 +11,7 @@ RCLONE=/usr/local/bin/rclone SPEED="" CRONMODE=0 -CONNECTIONS=32 +CONNECTIONS=20 LOG=/dev/stdout DATE=/bin/date DOALL=0 @@ -223,8 +223,8 @@ for f in $REPOSTOBACKUP; do exit 1 fi - count=`find ${DATAPATH} -type f | wc -l` - if [ $count -le 1 ]; then + count=`ls ${DATAPATH} | wc -l` + if [ $count -le 2 ]; then log "Error: ${DATAPATH} exists but appears to be empty" exit 1 fi