Parcourir la source

Check if blog directory exists within backup

Bob Mottram il y a 8 ans
Parent
révision
59b3cf03ab
1 fichiers modifiés avec 5 ajouts et 2 suppressions
  1. 5
    2
      src/freedombone-app-htmly

+ 5
- 2
src/freedombone-app-htmly Voir le fichier

@@ -226,8 +226,11 @@ function restore_local_htmly {
226 226
     if [ $HTMLY_DOMAIN_NAME ]; then
227 227
         echo $"Restoring htmly installation"
228 228
         temp_restore_dir=/root/temphtmly
229
-        restore_directory_from_usb $temp_restore_dir blog
230
-        restore_directory_from_usb $temp_restore_dir htmly
229
+        if [ -d $USB_MOUNT/backup/blog ]; then
230
+            restore_directory_from_usb $temp_restore_dir blog
231
+        else
232
+            restore_directory_from_usb $temp_restore_dir htmly
233
+        fi
231 234
         if [ -d /var/www/${HTMLY_DOMAIN_NAME}/htdocs ]; then
232 235
             rm -rf /var/www/${HTMLY_DOMAIN_NAME}/htdocs
233 236
         fi