diff --git a/src/freedombone-app-mediagoblin b/src/freedombone-app-mediagoblin index ed217884..d023faca 100755 --- a/src/freedombone-app-mediagoblin +++ b/src/freedombone-app-mediagoblin @@ -71,7 +71,22 @@ function backup_remote_mediagoblin { } function restore_remote_mediagoblin { - echo -n '' + if grep -q "Mediagoblin domain" $COMPLETION_FILE; then + MEDIAGOBLIN_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Mediagoblin domain" | awk -F ':' '{print $2}') + if [ -d $SERVER_DIRECTORY/backup/mediagoblin ]; then + echo $"Restoring Mediagoblin installation" + temp_restore_dir=/root/tempmediagoblin + function_check restore_directory_from_friend + restore_directory_from_friend $temp_restore_dir mediagoblin + cp -r $temp_restore_dir/* / + if [ ! "$?" = "0" ]; then + exit 5626 + fi + rm -rf $temp_restore_dir + echo $"Restore of Mediagoblin complete" + fi + chown -hR mediagoblin:www-data /var/www/$MEDIAGOBLIN_DOMAIN_NAME/htdocs + fi } function remove_mediagoblin { diff --git a/src/freedombone-restore-remote b/src/freedombone-restore-remote index cccbad66..01ef5e25 100755 --- a/src/freedombone-restore-remote +++ b/src/freedombone-restore-remote @@ -666,28 +666,6 @@ function restore_mailing_list { fi } -function restore_mediagoblin { - if [[ $RESTORE_APP != 'all' ]]; then - if [[ $RESTORE_APP != 'mediagoblin' ]]; then - return - fi - fi - if grep -q "Mediagoblin domain" $COMPLETION_FILE; then - MEDIAGOBLIN_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Mediagoblin domain" | awk -F ':' '{print $2}') - if [ -d $SERVER_DIRECTORY/backup/mediagoblin ]; then - echo $"Restoring Mediagoblin installation" - temp_restore_dir=/root/tempmediagoblin - restore_directory_from_friend $temp_restore_dir mediagoblin - cp -r $temp_restore_dir/* / - if [ ! "$?" = "0" ]; then - exit 5626 - fi - rm -rf $temp_restore_dir - fi - chown -hR mediagoblin:www-data /var/www/$MEDIAGOBLIN_DOMAIN_NAME/htdocs - fi -} - function restore_gogs { export GVM_ROOT=$GVM_HOME if [ -d $GVM_ROOT/bin ]; then @@ -954,8 +932,8 @@ restore_certs restore_personal_settings restore_mailing_list restore_email +#restore_apps remote -restore_mediagoblin restore_gogs restore_wiki restore_blog