Improve hubzilla local backup

This commit is contained in:
Bob Mottram 2016-07-07 11:59:56 +01:00
parent a17c56f243
commit 28cc306cd8
No known key found for this signature in database
GPG Key ID: BA68F26108DC9F87
1 changed files with 344 additions and 337 deletions

View File

@ -59,8 +59,13 @@ function upgrade_hubzilla {
} }
function backup_local_hubzilla { function backup_local_hubzilla {
if grep -q "Hubzilla domain" $COMPLETION_FILE; then
if [ -d /var/www/${HUBZILLA_DOMAIN_NAME}/htdocs ]; then
echo $"Backing up Hubzilla" echo $"Backing up Hubzilla"
HUBZILLA_DOMAIN_NAME='hubzilla'
HUBZILLA_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Hubzilla domain" | awk -F ':' '{print $2}')
function_check backup_database_local function_check backup_database_local
backup_database_local hubzilla backup_database_local hubzilla
@ -69,6 +74,8 @@ function backup_local_hubzilla {
backup_directory_to_usb /var/www/${HUBZILLA_DOMAIN_NAME}/htdocs hubzilla backup_directory_to_usb /var/www/${HUBZILLA_DOMAIN_NAME}/htdocs hubzilla
echo $"Hubzilla backup complete" echo $"Hubzilla backup complete"
fi
fi
} }
function backup_remote_hubzilla { function backup_remote_hubzilla {