|
@@ -182,19 +182,55 @@ function upgrade_akaunting {
|
182
|
182
|
|
183
|
183
|
|
184
|
184
|
function backup_local_akaunting {
|
185
|
|
- echo -n ''
|
|
185
|
+ akaunting_path=/var/www/${AKAUNTING_DOMAIN_NAME}/htdocs
|
|
186
|
+ if [ -d $akaunting_path ]; then
|
|
187
|
+ suspend_site ${AKAUNTING_DOMAIN_NAME}
|
|
188
|
+ function_check backup_database_to_usb
|
|
189
|
+ backup_database_to_usb akaunting
|
|
190
|
+ backup_directory_to_usb $akaunting_path akaunting
|
|
191
|
+ restart_site
|
|
192
|
+ fi
|
186
|
193
|
}
|
187
|
194
|
|
188
|
195
|
function restore_local_akaunting {
|
189
|
|
- echo -n ''
|
|
196
|
+ temp_restore_dir=/root/tempakaunting
|
|
197
|
+ akaunting_dir=/var/www/${AKAUNTING_DOMAIN_NAME}/htdocs
|
|
198
|
+
|
|
199
|
+ suspend_site ${AKAUNTING_DOMAIN_NAME}
|
|
200
|
+
|
|
201
|
+ function_check akaunting_create_database
|
|
202
|
+ akaunting_create_database
|
|
203
|
+
|
|
204
|
+ restore_database akaunting ${AKAUNTING_DOMAIN_NAME}
|
|
205
|
+ chown www-data:www-data $akaunting_dir
|
|
206
|
+
|
|
207
|
+ restart_site
|
190
|
208
|
}
|
191
|
209
|
|
192
|
210
|
function backup_remote_akaunting {
|
193
|
|
- echo -n ''
|
|
211
|
+ akaunting_path=/var/www/${AKAUNTING_DOMAIN_NAME}/htdocs
|
|
212
|
+ if [ -d $akaunting_path ]; then
|
|
213
|
+ suspend_site ${AKAUNTING_DOMAIN_NAME}
|
|
214
|
+ function_check backup_database_to_friend
|
|
215
|
+ backup_database_to_friend akaunting
|
|
216
|
+ backup_directory_to_friend $akaunting_path akaunting
|
|
217
|
+ restart_site
|
|
218
|
+ fi
|
194
|
219
|
}
|
195
|
220
|
|
196
|
221
|
function restore_remote_akaunting {
|
197
|
|
- echo -n ''
|
|
222
|
+ temp_restore_dir=/root/tempakaunting
|
|
223
|
+ akaunting_dir=/var/www/${AKAUNTING_DOMAIN_NAME}/htdocs
|
|
224
|
+
|
|
225
|
+ suspend_site ${AKAUNTING_DOMAIN_NAME}
|
|
226
|
+
|
|
227
|
+ function_check akaunting_create_database
|
|
228
|
+ akaunting_create_database
|
|
229
|
+
|
|
230
|
+ restore_database_from_friend akaunting ${AKAUNTING_DOMAIN_NAME}
|
|
231
|
+ chown www-data:www-data $akaunting_dir
|
|
232
|
+
|
|
233
|
+ restart_site
|
198
|
234
|
}
|
199
|
235
|
|
200
|
236
|
function remove_akaunting {
|