|
@@ -313,6 +313,10 @@ function reconfigure_matrix {
|
313
|
313
|
}
|
314
|
314
|
|
315
|
315
|
function upgrade_matrix {
|
|
316
|
+ systemctl stop turn
|
|
317
|
+ systemctl stop matrix
|
|
318
|
+ systemctl stop sydent
|
|
319
|
+
|
316
|
320
|
function_check set_repo_commit
|
317
|
321
|
set_repo_commit /etc/matrix "matrix commit" "$MATRIX_COMMIT" $MATRIX_REPO
|
318
|
322
|
cd /etc/matrix
|
|
@@ -328,14 +332,18 @@ function upgrade_matrix {
|
328
|
332
|
chown -R matrix:matrix /etc/sydent
|
329
|
333
|
chown -R matrix:matrix $MATRIX_DATA_DIR
|
330
|
334
|
|
331
|
|
- systemctl restart turn
|
332
|
|
- systemctl restart matrix
|
|
335
|
+ systemctl start turn
|
|
336
|
+ systemctl start matrix
|
|
337
|
+ systemctl start sydent
|
333
|
338
|
}
|
334
|
339
|
|
335
|
340
|
function backup_local_matrix {
|
336
|
341
|
source_directory=/etc/matrix
|
337
|
342
|
if [ -d $source_directory ]; then
|
|
343
|
+ systemctl stop turn
|
338
|
344
|
systemctl stop matrix
|
|
345
|
+ systemctl stop sydent
|
|
346
|
+
|
339
|
347
|
function_check backup_directory_to_usb
|
340
|
348
|
backup_directory_to_usb $source_directory matrix
|
341
|
349
|
source_directory=$MATRIX_DATA_DIR
|
|
@@ -346,13 +354,18 @@ function backup_local_matrix {
|
346
|
354
|
if [ -d $source_directory ]; then
|
347
|
355
|
backup_directory_to_usb $source_directory matrixid
|
348
|
356
|
fi
|
|
357
|
+
|
|
358
|
+ systemctl start turn
|
349
|
359
|
systemctl start matrix
|
|
360
|
+ systemctl start sydent
|
350
|
361
|
fi
|
351
|
362
|
}
|
352
|
363
|
|
353
|
364
|
function restore_local_matrix {
|
354
|
365
|
if [ -d /etc/matrix ]; then
|
|
366
|
+ systemctl stop turn
|
355
|
367
|
systemctl stop matrix
|
|
368
|
+ systemctl stop sydent
|
356
|
369
|
|
357
|
370
|
temp_restore_dir=/root/tempmatrix
|
358
|
371
|
function_check restore_directory_from_usb
|
|
@@ -388,14 +401,19 @@ function restore_local_matrix {
|
388
|
401
|
rm -rf $temp_restore_dir
|
389
|
402
|
chown -R matrix:matrix /etc/sydent
|
390
|
403
|
|
|
404
|
+ systemctl start turn
|
391
|
405
|
systemctl start matrix
|
|
406
|
+ systemctl start sydent
|
392
|
407
|
fi
|
393
|
408
|
}
|
394
|
409
|
|
395
|
410
|
function backup_remote_matrix {
|
396
|
411
|
source_directory=/etc/matrix
|
397
|
412
|
if [ -d $source_directory ]; then
|
|
413
|
+ systemctl stop turn
|
398
|
414
|
systemctl stop matrix
|
|
415
|
+ systemctl stop sydent
|
|
416
|
+
|
399
|
417
|
function_check backup_directory_to_friend
|
400
|
418
|
backup_directory_to_friend $source_directory matrix
|
401
|
419
|
source_directory=$MATRIX_DATA_DIR
|
|
@@ -406,13 +424,18 @@ function backup_remote_matrix {
|
406
|
424
|
if [ -d $source_directory ]; then
|
407
|
425
|
backup_directory_to_friend $source_directory matrixid
|
408
|
426
|
fi
|
|
427
|
+
|
|
428
|
+ systemctl start turn
|
409
|
429
|
systemctl start matrix
|
|
430
|
+ systemctl start sydent
|
410
|
431
|
fi
|
411
|
432
|
}
|
412
|
433
|
|
413
|
434
|
function restore_remote_matrix {
|
414
|
435
|
if [ -d /etc/matrix ]; then
|
|
436
|
+ systemctl stop turn
|
415
|
437
|
systemctl stop matrix
|
|
438
|
+ systemctl stop sydent
|
416
|
439
|
|
417
|
440
|
temp_restore_dir=/root/tempmatrix
|
418
|
441
|
function_check restore_directory_from_friend
|
|
@@ -442,7 +465,9 @@ function restore_remote_matrix {
|
442
|
465
|
rm -rf $temp_restore_dir
|
443
|
466
|
chown -R matrix:matrix /etc/sydent
|
444
|
467
|
|
|
468
|
+ systemctl start turn
|
445
|
469
|
systemctl start matrix
|
|
470
|
+ systemctl start sydent
|
446
|
471
|
fi
|
447
|
472
|
}
|
448
|
473
|
|