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

Move hubzilla local restore to app script

parent e2ad22bd
No related branches found
No related tags found
No related merge requests found
......@@ -76,10 +76,38 @@ function backup_local_hubzilla {
fi
}
function restore_local_hubzilla {
if ! grep -q "Hubzilla domain" $COMPLETION_FILE; then
return
fi
HUBZILLA_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Hubzilla domain" | awk -F ':' '{print $2}')
if [ $HUBZILLA_DOMAIN_NAME ]; then
echo $"Restoring Hubzilla"
temp_restore_dir=/root/temphubzilla
hubzilla_dir=/var/www/${HUBZILLA_DOMAIN_NAME}/htdocs
restore_database hubzilla ${HUBZILLA_DOMAIN_NAME}
if [ -d $USB_MOUNT/backup/hubzilla ]; then
if [ ! -d $hubzilla_dir/store/[data]/smarty3 ]; then
mkdir -p $hubzilla_dir/store/[data]/smarty3
fi
chmod 777 $hubzilla_dir/store/[data]/smarty3
chown -R www-data:www-data $hubzilla_dir/*
if [ -d $temp_restore_dir ]; then
rm -rf $temp_restore_dir
fi
fi
echo $"Restore of Hubzilla complete"
fi
}
function backup_remote_hubzilla {
echo -n ''
}
function restore_remote_hubzilla {
echo -n ''
}
function remove_hubzilla {
if ! grep -Fxq "install_hubzilla" $COMPLETION_FILE; then
return
......
......@@ -840,27 +840,6 @@ function restore_gnusocial {
fi
}
function restore_hubzilla {
if [[ $RESTORE_APP != 'all' ]]; then
if [[ $RESTORE_APP != 'hubzilla' ]]; then
return
fi
fi
if [ $HUBZILLA_DOMAIN_NAME ]; then
restore_database hubzilla ${HUBZILLA_DOMAIN_NAME}
if [ -d $USB_MOUNT/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/*
if [ -d /root/temphubzilla ]; then
rm -rf /root/temphubzilla
fi
fi
fi
}
function restore_email {
if [[ $RESTORE_APP != 'all' ]]; then
if [[ $RESTORE_APP != 'email' ]]; then
......@@ -951,7 +930,6 @@ restore_mailing_list
restore_ipfs
restore_xmpp
restore_gnusocial
restore_hubzilla
restore_email
restore_apps
......
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