diff --git a/uberspace-backup.sh b/uberspace-backup.sh index 9801763..72f2b54 100755 --- a/uberspace-backup.sh +++ b/uberspace-backup.sh @@ -46,6 +46,7 @@ function logecho { echo "$(pdate) $*" >> "$LOG" } +# Loop over all hosts while read -r line; do # if line is a comment or blank, go to next line if echo "$line" | grep -qE "^\s*(#|$)"; then continue; fi @@ -80,6 +81,9 @@ while read -r line; do logecho "${RHOST}: Starting backups" + logecho "${RHOST}: Deleting host's temporary directories in ${TEMPDIR}" + rm -rf "${TEMPDIR:?}/${RHOST:?}/*" + NORDIR=$(echo "$ALLRDIR" | grep -o "|" | wc -l || true) NORDIR=$(($NORDIR + 1))