浏览代码

Better naming to differentiate config files from user config

Bob Mottram 8 年前
父节点
当前提交
a912e6cfc3

+ 3
- 3
src/freedombone-backup-local 查看文件

@@ -243,7 +243,7 @@ function prepare_directories {
243 243
     fi
244 244
 }
245 245
 
246
-function backup_configuration {
246
+function backup_configfiles {
247 247
     echo $"Backing up ${PROJECT_NAME} configuration files"
248 248
     temp_backup_dir=/root/tempbackupconfig
249 249
     if [ ! -d $temp_backup_dir ]; then
@@ -258,7 +258,7 @@ function backup_configuration {
258 258
     if [ -f /etc/nginx/.htpasswd ]; then
259 259
         cp -f /etc/nginx/.htpasswd $temp_backup_dir/htpasswd
260 260
     fi
261
-    backup_directory_to_usb $temp_backup_dir config
261
+    backup_directory_to_usb $temp_backup_dir configfiles
262 262
 }
263 263
 
264 264
 function backup_admin_readme {
@@ -307,7 +307,7 @@ backup_users
307 307
 prepare_directories
308 308
 backup_directories
309 309
 backup_apps local
310
-backup_configuration
310
+backup_configfiles
311 311
 backup_admin_readme
312 312
 backup_mariadb
313 313
 backup_extra_directories local

+ 3
- 3
src/freedombone-backup-remote 查看文件

@@ -108,7 +108,7 @@ function restart_site {
108 108
     SUSPENDED_SITE=
109 109
 }
110 110
 
111
-function backup_configuration {
111
+function backup_configfiles {
112 112
     echo $"Backing up ${PROJECT_NAME} configuration files"
113 113
     temp_backup_dir=/root/tempbackupconfig
114 114
     if [ ! -d $temp_backup_dir ]; then
@@ -123,7 +123,7 @@ function backup_configuration {
123 123
     if [ -f /etc/nginx/.htpasswd ]; then
124 124
         cp -f /etc/nginx/.htpasswd $temp_backup_dir/htpasswd
125 125
     fi
126
-    backup_directory_to_friend $temp_backup_dir config
126
+    backup_directory_to_friend $temp_backup_dir configfiles
127 127
 }
128 128
 
129 129
 function backup_users {
@@ -369,7 +369,7 @@ if [[ "$1" == "test" ]]; then
369 369
     TEST_MODE="yes"
370 370
 fi
371 371
 
372
-backup_configuration
372
+backup_configfiles
373 373
 if [[ $TEST_MODE == "no" ]]; then
374 374
     backup_users
375 375
     backup_letsencrypt

+ 1
- 1
src/freedombone-controlpanel 查看文件

@@ -892,7 +892,7 @@ function restore_data_from_storage {
892 892
         restore_command="${PROJECT_NAME}-restore-local $USB_DRIVE"
893 893
     fi
894 894
 
895
-    utils_installed=(config
895
+    utils_installed=(configfiles
896 896
                      mariadb
897 897
                      letsencrypt
898 898
                      mutt

+ 4
- 4
src/freedombone-restore-local 查看文件

@@ -95,9 +95,9 @@ function copy_gpg_keys {
95 95
     cp -r /home/$ADMIN_USERNAME/.gnupg /root
96 96
 }
97 97
 
98
-function restore_config {
98
+function restore_configfiles {
99 99
     if [[ $RESTORE_APP != 'all' ]]; then
100
-        if [[ $RESTORE_APP != 'config' ]]; then
100
+        if [[ $RESTORE_APP != 'configfiles' ]]; then
101 101
             return
102 102
         fi
103 103
     fi
@@ -106,7 +106,7 @@ function restore_config {
106 106
     if [ -d $USB_MOUNT/backup/config ]; then
107 107
         echo $"Restoring configuration files"
108 108
         temp_restore_dir=/root/tempconfig
109
-        restore_directory_from_usb $temp_restore_dir config
109
+        restore_directory_from_usb $temp_restore_dir configfiles
110 110
 
111 111
         if [ -f $temp_restore_dir/root/${PROJECT_NAME}.cfg ]; then
112 112
             cp -f $temp_restore_dir/root/${PROJECT_NAME}.cfg $CONFIGURATION_FILE
@@ -705,7 +705,7 @@ backup_mount_drive ${1} ${ADMIN_USERNAME} ${2}
705 705
 check_backup_exists
706 706
 check_admin_user
707 707
 copy_gpg_keys
708
-restore_config
708
+restore_configfiles
709 709
 same_admin_user
710 710
 restore_mariadb
711 711
 restore_letsencrypt

+ 3
- 3
src/freedombone-restore-remote 查看文件

@@ -104,7 +104,7 @@ function copy_gpg_keys {
104 104
     cp -r /home/$ADMIN_USERNAME/.gnupg /root
105 105
 }
106 106
 
107
-function restore_configuration {
107
+function restore_configfiles {
108 108
     if [[ $RESTORE_APP != 'all' ]]; then
109 109
         if [[ $RESTORE_APP != 'configuration' ]]; then
110 110
             return
@@ -113,7 +113,7 @@ function restore_configuration {
113 113
     if [ -d $SERVER_DIRECTORY/backup/config ]; then
114 114
         echo $"Restoring configuration files"
115 115
         temp_restore_dir=/root/tempconfig
116
-        restore_directory_from_friend $temp_restore_dir config
116
+        restore_directory_from_friend $temp_restore_dir configfiles
117 117
 
118 118
         if [ -f $temp_restore_dir/root/${PROJECT_NAME}.cfg ]; then
119 119
             cp -f $temp_restore_dir/root/${PROJECT_NAME}.cfg $CONFIGURATION_FILE
@@ -642,7 +642,7 @@ function restore_email {
642 642
 ${PROJECT_NAME}-recoverkey -u ${ADMIN_USERNAME} -l $BACKUP_LIST
643 643
 
644 644
 copy_gpg_keys
645
-restore_configuration
645
+restore_configfiles
646 646
 restore_mariadb
647 647
 restore_letsencrypt
648 648
 restore_mutt_settings