From 59b3cf03ab03685c3d6a88541eb884288897432b Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 29 Oct 2016 16:24:30 +0100 Subject: [PATCH] Check if blog directory exists within backup --- src/freedombone-app-htmly | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/freedombone-app-htmly b/src/freedombone-app-htmly index b8d389f5..61210131 100755 --- a/src/freedombone-app-htmly +++ b/src/freedombone-app-htmly @@ -226,8 +226,11 @@ function restore_local_htmly { if [ $HTMLY_DOMAIN_NAME ]; then echo $"Restoring htmly installation" temp_restore_dir=/root/temphtmly - restore_directory_from_usb $temp_restore_dir blog - restore_directory_from_usb $temp_restore_dir htmly + if [ -d $USB_MOUNT/backup/blog ]; then + restore_directory_from_usb $temp_restore_dir blog + else + restore_directory_from_usb $temp_restore_dir htmly + fi if [ -d /var/www/${HTMLY_DOMAIN_NAME}/htdocs ]; then rm -rf /var/www/${HTMLY_DOMAIN_NAME}/htdocs fi