From ca08e20253af1858b027ee577f62609fb05aeef3 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 26 Oct 2022 12:34:51 -0400 Subject: [PATCH] Update core-restore-from-backup.sh --- misc/core-restore-from-backup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/core-restore-from-backup.sh b/misc/core-restore-from-backup.sh index ece2d0bf..e603cc6d 100644 --- a/misc/core-restore-from-backup.sh +++ b/misc/core-restore-from-backup.sh @@ -46,6 +46,7 @@ function msg_error() { local msg="$1" echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } +if [ -z "$(ls -A /root/.homeassistant/backups/)" ]; then msg_error "No backups found! \n"; exit 1; fi DIR=/root/.homeassistant/restore if [ -d "$DIR" ]; then @@ -54,7 +55,6 @@ else mkdir -p /root/.homeassistant/restore msg_ok "Created Restore Directory." fi -if [ -z "$(ls -A /root/.homeassistant/backups/)" ]; then msg_error "No backups found! \n"; exit 1; fi cd /root/.homeassistant/backups/ PS3="Please enter your choice: " files="$(ls -A .)"