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

Better naming to differentiate config files from user config

parent 26e1713c
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
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