From a912e6cfc36958b70058873c3dea0c31e4be5a73 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 24 Oct 2016 22:25:56 +0100 Subject: [PATCH] Better naming to differentiate config files from user config --- src/freedombone-backup-local | 6 +++--- src/freedombone-backup-remote | 6 +++--- src/freedombone-controlpanel | 2 +- src/freedombone-restore-local | 8 ++++---- src/freedombone-restore-remote | 6 +++--- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/freedombone-backup-local b/src/freedombone-backup-local index c0fbe64f..b039a0e7 100755 --- a/src/freedombone-backup-local +++ b/src/freedombone-backup-local @@ -243,7 +243,7 @@ function prepare_directories { fi } -function backup_configuration { +function backup_configfiles { echo $"Backing up ${PROJECT_NAME} configuration files" temp_backup_dir=/root/tempbackupconfig if [ ! -d $temp_backup_dir ]; then @@ -258,7 +258,7 @@ function backup_configuration { if [ -f /etc/nginx/.htpasswd ]; then cp -f /etc/nginx/.htpasswd $temp_backup_dir/htpasswd fi - backup_directory_to_usb $temp_backup_dir config + backup_directory_to_usb $temp_backup_dir configfiles } function backup_admin_readme { @@ -307,7 +307,7 @@ backup_users prepare_directories backup_directories backup_apps local -backup_configuration +backup_configfiles backup_admin_readme backup_mariadb backup_extra_directories local diff --git a/src/freedombone-backup-remote b/src/freedombone-backup-remote index 8126d25f..2b1ad835 100755 --- a/src/freedombone-backup-remote +++ b/src/freedombone-backup-remote @@ -108,7 +108,7 @@ function restart_site { SUSPENDED_SITE= } -function backup_configuration { +function backup_configfiles { echo $"Backing up ${PROJECT_NAME} configuration files" temp_backup_dir=/root/tempbackupconfig if [ ! -d $temp_backup_dir ]; then @@ -123,7 +123,7 @@ function backup_configuration { if [ -f /etc/nginx/.htpasswd ]; then cp -f /etc/nginx/.htpasswd $temp_backup_dir/htpasswd fi - backup_directory_to_friend $temp_backup_dir config + backup_directory_to_friend $temp_backup_dir configfiles } function backup_users { @@ -369,7 +369,7 @@ if [[ "$1" == "test" ]]; then TEST_MODE="yes" fi -backup_configuration +backup_configfiles if [[ $TEST_MODE == "no" ]]; then backup_users backup_letsencrypt diff --git a/src/freedombone-controlpanel b/src/freedombone-controlpanel index c57a8acd..4c5f0331 100755 --- a/src/freedombone-controlpanel +++ b/src/freedombone-controlpanel @@ -892,7 +892,7 @@ function restore_data_from_storage { restore_command="${PROJECT_NAME}-restore-local $USB_DRIVE" fi - utils_installed=(config + utils_installed=(configfiles mariadb letsencrypt mutt diff --git a/src/freedombone-restore-local b/src/freedombone-restore-local index 019ce9aa..eeebf825 100755 --- a/src/freedombone-restore-local +++ b/src/freedombone-restore-local @@ -95,9 +95,9 @@ function copy_gpg_keys { cp -r /home/$ADMIN_USERNAME/.gnupg /root } -function restore_config { +function restore_configfiles { if [[ $RESTORE_APP != 'all' ]]; then - if [[ $RESTORE_APP != 'config' ]]; then + if [[ $RESTORE_APP != 'configfiles' ]]; then return fi fi @@ -106,7 +106,7 @@ function restore_config { if [ -d $USB_MOUNT/backup/config ]; then echo $"Restoring configuration files" temp_restore_dir=/root/tempconfig - restore_directory_from_usb $temp_restore_dir config + restore_directory_from_usb $temp_restore_dir configfiles if [ -f $temp_restore_dir/root/${PROJECT_NAME}.cfg ]; then cp -f $temp_restore_dir/root/${PROJECT_NAME}.cfg $CONFIGURATION_FILE @@ -705,7 +705,7 @@ backup_mount_drive ${1} ${ADMIN_USERNAME} ${2} check_backup_exists check_admin_user copy_gpg_keys -restore_config +restore_configfiles same_admin_user restore_mariadb restore_letsencrypt diff --git a/src/freedombone-restore-remote b/src/freedombone-restore-remote index af62d285..98f87b25 100755 --- a/src/freedombone-restore-remote +++ b/src/freedombone-restore-remote @@ -104,7 +104,7 @@ function copy_gpg_keys { cp -r /home/$ADMIN_USERNAME/.gnupg /root } -function restore_configuration { +function restore_configfiles { if [[ $RESTORE_APP != 'all' ]]; then if [[ $RESTORE_APP != 'configuration' ]]; then return @@ -113,7 +113,7 @@ function restore_configuration { if [ -d $SERVER_DIRECTORY/backup/config ]; then echo $"Restoring configuration files" temp_restore_dir=/root/tempconfig - restore_directory_from_friend $temp_restore_dir config + restore_directory_from_friend $temp_restore_dir configfiles if [ -f $temp_restore_dir/root/${PROJECT_NAME}.cfg ]; then cp -f $temp_restore_dir/root/${PROJECT_NAME}.cfg $CONFIGURATION_FILE @@ -642,7 +642,7 @@ function restore_email { ${PROJECT_NAME}-recoverkey -u ${ADMIN_USERNAME} -l $BACKUP_LIST copy_gpg_keys -restore_configuration +restore_configfiles restore_mariadb restore_letsencrypt restore_mutt_settings