Skip to content
Snippets Groups Projects
Commit 908919e1 authored by Bob Mottram's avatar Bob Mottram
Browse files

Move remote hubzilla restore to app script

parent 26f33401
No related branches found
No related tags found
No related merge requests found
......@@ -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 {
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment