|
@@ -30,6 +30,7 @@
|
30
|
30
|
|
31
|
31
|
PROJECT_NAME='freedombone'
|
32
|
32
|
COMPLETION_FILE=$HOME/${PROJECT_NAME}-completed.txt
|
|
33
|
+CONFIG_FILE=$HOME/${PROJECT_NAME}.cfg
|
33
|
34
|
|
34
|
35
|
export TEXTDOMAIN=${PROJECT_NAME}-restore-remote
|
35
|
36
|
export TEXTDOMAINDIR="/usr/share/locale"
|
|
@@ -135,6 +136,25 @@ function restore_database_from_friend {
|
135
|
136
|
fi
|
136
|
137
|
}
|
137
|
138
|
|
|
139
|
+# Restore configuration files
|
|
140
|
+if [ -d $SERVER_DIRECTORY/backup/config ]; then
|
|
141
|
+ echo $"Restoring configuration files"
|
|
142
|
+ restore_directory_from_friend /root/tempconfig config
|
|
143
|
+ cp -f /root/tempconfig/root/${PROJECT_NAME}.cfg $CONFIG_FILE
|
|
144
|
+ if [ ! "$?" = "0" ]; then
|
|
145
|
+ unmount_drive
|
|
146
|
+ rm -rf /root/tempconfig
|
|
147
|
+ exit 5372
|
|
148
|
+ fi
|
|
149
|
+ cp -f /root/tempconfig/root/${PROJECT_NAME}-completed.txt $COMPLETION_FILE
|
|
150
|
+ if [ ! "$?" = "0" ]; then
|
|
151
|
+ unmount_drive
|
|
152
|
+ rm -rf /root/tempconfig
|
|
153
|
+ exit 7252
|
|
154
|
+ fi
|
|
155
|
+ rm -rf /root/tempconfig
|
|
156
|
+fi
|
|
157
|
+
|
138
|
158
|
# Restore MariaDB
|
139
|
159
|
if [ -d $SERVER_DIRECTORY/backup/mariadb ]; then
|
140
|
160
|
echo $"Restoring MariaDB settings"
|