From b90ce42209bb12b210298b421c76bbb1933c566e Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 31 Oct 2016 17:30:24 +0000 Subject: [PATCH] Avoid getting stuck with old backups --- src/freedombone-app-dokuwiki | 6 +++--- src/freedombone-app-htmly | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/freedombone-app-dokuwiki b/src/freedombone-app-dokuwiki index e4c56b89..d75948f0 100755 --- a/src/freedombone-app-dokuwiki +++ b/src/freedombone-app-dokuwiki @@ -93,10 +93,10 @@ function restore_local_dokuwiki { DOKUWIKI_DOMAIN_NAME=$(get_completion_param "dokuwiki domain") temp_restore_dir=/root/tempdokuwiki function_check restore_directory_from_usb - if [ -d ${USB_MOUNT}/backup/wiki ]; then - restore_directory_from_usb ${temp_restore_dir} wiki - else + if [ -d ${USB_MOUNT}/backup/dokuwiki ]; then restore_directory_from_usb ${temp_restore_dir} dokuwiki + else + restore_directory_from_usb ${temp_restore_dir} wiki fi cp -r ${temp_restore_dir}/var/lib/dokuwiki/* /var/lib/dokuwiki/ if [ ! "$?" = "0" ]; then diff --git a/src/freedombone-app-htmly b/src/freedombone-app-htmly index 9fe4c733..2bb6ccc1 100755 --- a/src/freedombone-app-htmly +++ b/src/freedombone-app-htmly @@ -226,10 +226,10 @@ function restore_local_htmly { if [ $HTMLY_DOMAIN_NAME ]; then echo $"Restoring htmly installation" temp_restore_dir=/root/temphtmly - if [ -d $USB_MOUNT/backup/blog ]; then - restore_directory_from_usb $temp_restore_dir blog - else + if [ -d $USB_MOUNT/backup/htmly ]; then restore_directory_from_usb $temp_restore_dir htmly + else + restore_directory_from_usb $temp_restore_dir blog fi if [ -d /var/www/${HTMLY_DOMAIN_NAME}/htdocs ]; then rm -rf /var/www/${HTMLY_DOMAIN_NAME}/htdocs