浏览代码

Merge branch 'stretch' of https://github.com/bashrc/freedombone

Bob Mottram 6 年前
父节点
当前提交
efd32577e5
共有 1 个文件被更改,包括 15 次插入3 次删除
  1. 15
    3
      src/freedombone-app-matrix

+ 15
- 3
src/freedombone-app-matrix 查看文件

@@ -48,7 +48,7 @@ MATRIX_PORT=8009
48 48
 MATRIX_FEDERATION_ONION_PORT=8111
49 49
 MATRIX_ONION_PORT=8109
50 50
 MATRIX_REPO="https://github.com/matrix-org/synapse"
51
-MATRIX_COMMIT='ab5e888927e6a38190a65e10af7acf67873124e3'
51
+MATRIX_COMMIT='9e8ab0a4f44a3ec9e4b049f5571c14e333e8f0fa'
52 52
 REPORT_STATS="no"
53 53
 MATRIX_SECRET=
54 54
 MATRIX_EXPIRE_MONTHS=1
@@ -418,6 +418,11 @@ function upgrade_matrix {
418 418
     function_check set_repo_commit
419 419
     set_repo_commit /etc/matrix "matrix commit" "$MATRIX_COMMIT" $MATRIX_REPO
420 420
     cd /etc/matrix || exit 62476724
421
+    if [ ! -d /etc/matrix/tmp ]; then
422
+        mkdir /etc/matrix/tmp
423
+    fi
424
+    export TMPDIR=/etc/matrix/tmp
425
+
421 426
     pip install --upgrade --process-dependency-links .
422 427
     pip install --upgrade --force "pynacl>=1.2.1"
423 428
 
@@ -426,7 +431,8 @@ function upgrade_matrix {
426 431
     chown -R matrix:matrix /etc/matrix
427 432
     chown -R matrix:matrix $MATRIX_DATA_DIR
428 433
 
429
-    pip install --upgrade --force "pynacl==0.3.0"
434
+    pip install --upgrade --force "pynacl>=1.2.1"
435
+    pip install --upgrade --force "canonicaljson>=1.1.3"
430 436
     pip install --upgrade --force "phonenumbers>=8.2.0"
431 437
 
432 438
     if [ -f /etc/ssl/certs/${MATRIX_DOMAIN_NAME}.dhparam ]; then
@@ -434,6 +440,11 @@ function upgrade_matrix {
434 440
     fi
435 441
     systemctl start turn
436 442
     systemctl start matrix
443
+
444
+    export TMPDIR=/tmp
445
+    if [ -d /etc/matrix/tmp ]; then
446
+        rm -rf /etc/matrix/tmp/*
447
+    fi
437 448
 }
438 449
 
439 450
 function backup_local_matrix {
@@ -794,7 +805,8 @@ function install_matrix {
794 805
     # wait for nginx to start otherwise user add fails later
795 806
     sleep 5
796 807
 
797
-    pip install --upgrade --force "pynacl==0.3.0"
808
+    pip install --upgrade --force "pynacl>=1.2.1"
809
+    pip install --upgrade --force "canonicaljson>=1.1.3"
798 810
 
799 811
     if [[ $(add_user_matrix "${MY_USERNAME}" "${MATRIX_PASSWORD}" | tail -n 1) != "0" ]]; then
800 812
         echo $'Failed to add matrix admin user';