diff --git a/src/freedombone-app-hubzilla b/src/freedombone-app-hubzilla index b07902db..b96f301d 100755 --- a/src/freedombone-app-hubzilla +++ b/src/freedombone-app-hubzilla @@ -122,7 +122,23 @@ function backup_remote_hubzilla { } function restore_remote_hubzilla { - echo -n '' + if grep -q "Hubzilla domain" $COMPLETION_FILE; then + echo $"Restoring Hubzilla" + HUBZILLA_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Hubzilla domain" | awk -F ':' '{print $2}') + function_check restore_database_from_friend + restore_database_from_friend hubzilla ${HUBZILLA_DOMAIN_NAME} + if [ -d $SERVER_DIRECTORY/backup/hubzilla ]; then + if [ ! -d /var/www/${HUBZILLA_DOMAIN_NAME}/htdocs/store/[data]/smarty3 ]; then + mkdir -p /var/www/${HUBZILLA_DOMAIN_NAME}/htdocs/store/[data]/smarty3 + fi + chmod 777 /var/www/${HUBZILLA_DOMAIN_NAME}/htdocs/store/[data]/smarty3 + chown -R www-data:www-data /var/www/${HUBZILLA_DOMAIN_NAME}/htdocs/* + fi + if [ -d /root/temphubzilla ]; then + rm -rf /root/temphubzilla + fi + echo $"Restore of Hubzilla complete" + fi } function remove_hubzilla { diff --git a/src/freedombone-restore-remote b/src/freedombone-restore-remote index 9cef3f73..11039619 100755 --- a/src/freedombone-restore-remote +++ b/src/freedombone-restore-remote @@ -684,28 +684,6 @@ function restore_rss { fi } -function restore_hubzilla { - if [[ $RESTORE_APP != 'all' ]]; then - if [[ $RESTORE_APP != 'hubzilla' ]]; then - return - fi - fi - if grep -q "Hubzilla domain" $COMPLETION_FILE; then - HUBZILLA_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Hubzilla domain" | awk -F ':' '{print $2}') - restore_database_from_friend hubzilla ${HUBZILLA_DOMAIN_NAME} - if [ -d $SERVER_DIRECTORY/backup/hubzilla ]; then - if [ ! -d /var/www/${HUBZILLA_DOMAIN_NAME}/htdocs/store/[data]/smarty3 ]; then - mkdir -p /var/www/${HUBZILLA_DOMAIN_NAME}/htdocs/store/[data]/smarty3 - fi - chmod 777 /var/www/${HUBZILLA_DOMAIN_NAME}/htdocs/store/[data]/smarty3 - chown -R www-data:www-data /var/www/${HUBZILLA_DOMAIN_NAME}/htdocs/* - fi - if [ -d /root/temphubzilla ]; then - rm -rf /root/temphubzilla - fi - fi -} - function restore_syncthing { if [[ $RESTORE_APP != 'all' ]]; then if [[ $RESTORE_APP != 'syncthing' ]]; then @@ -1074,7 +1052,6 @@ restore_personal_settings restore_mailing_list restore_email -restore_hubzilla restore_rss restore_syncthing restore_mediagoblin