Move remote hubzilla restore to app script
This commit is contained in:
parent
26f3340120
commit
908919e11d
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue