Browse Source

matrix setup

Bob Mottram 7 years ago
parent
commit
e87f4286bb
1 changed files with 6 additions and 2 deletions
  1. 6
    2
      src/freedombone-app-matrix

+ 6
- 2
src/freedombone-app-matrix View File

@@ -11,6 +11,9 @@
11 11
 # matrix server
12 12
 #
13 13
 # https://raw.githubusercontent.com/silvio/docker-matrix
14
+# https://matrix.org/blog/2016/02/10/advanced-synapse-setup-with-lets-encrypt
15
+#
16
+# Test by visiting https://$MATRIX_DOMAIN_NAME/_matrix/key/v2/server/auto
14 17
 #
15 18
 # License
16 19
 # =======
@@ -48,7 +51,7 @@ MATRIX_ID_PORT=8081
48 51
 MATRIX_ONION_PORT=8109
49 52
 MATRIX_ID_ONION_PORT=8111
50 53
 MATRIX_REPO="https://github.com/matrix-org/synapse"
51
-MATRIX_COMMIT='27c005ae2c568909ab98fa936f38c0952bffe679'
54
+MATRIX_COMMIT='c45dc6c62aa2a2e83a10d8116a709dfd8c144e3c'
52 55
 SYDENT_REPO="https://github.com/matrix-org/sydent"
53 56
 SYDENT_COMMIT='d087278afd712222653b69ff72bd8ff4aa0180ec'
54 57
 REPORT_STATS="no"
@@ -704,8 +707,9 @@ function install_home_server {
704 707
     echo 'Type=simple' >> /etc/systemd/system/matrix.service
705 708
     echo 'User=matrix' >> /etc/systemd/system/matrix.service
706 709
     echo "WorkingDirectory=/etc/matrix" >> /etc/systemd/system/matrix.service
710
+    echo "ExecStartPre=/usr/bin/python -m synapse.app.homeserver --config-path ${MATRIX_DATA_DIR}/homeserver.yaml --generate-keys" >> /etc/systemd/system/matrix.service
707 711
     echo "ExecStart=/usr/bin/python -m synapse.app.homeserver --config-path ${MATRIX_DATA_DIR}/homeserver.yaml" >> /etc/systemd/system/matrix.service
708
-    echo 'Restart=always' >> /etc/systemd/system/matrix.service
712
+    echo 'Restart=on-failure' >> /etc/systemd/system/matrix.service
709 713
     echo 'RestartSec=10' >> /etc/systemd/system/matrix.service
710 714
     echo '' >> /etc/systemd/system/matrix.service
711 715
     echo '[Install]' >> /etc/systemd/system/matrix.service