From 099b244f9e455534f8846271990f6cc047fd6228 Mon Sep 17 00:00:00 2001 From: Wojciech Kozlowski Date: Sun, 15 Dec 2019 09:18:12 +0100 Subject: [PATCH] Fix check to see if backup directory exists --- backup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backup.sh b/backup.sh index 44988ff..3e66fba 100755 --- a/backup.sh +++ b/backup.sh @@ -92,7 +92,7 @@ function backup { volumes=$1 # Remove old backup directory - if [ ! -d ${BACKUP_DIR} ]; then + if [ -d ${BACKUP_DIR} ]; then rm -f ${BACKUP_DIR}/*.tar rmdir ${BACKUP_DIR} fi