Check if blog directory exists within backup

This commit is contained in:
Bob Mottram 2016-10-29 16:24:30 +01:00
parent c2233f5939
commit 59b3cf03ab
1 changed files with 5 additions and 2 deletions

View File

@ -226,8 +226,11 @@ 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
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