浏览代码

Avoid sydent generation step

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

+ 16
- 14
src/freedombone-app-matrix 查看文件

548
         exit 798362
548
         exit 798362
549
     fi
549
     fi
550
 
550
 
551
-    function_check matrix_generate_identityserver_file
552
-    matrix_generate_identityserver_file /etc/sydent/sydent.conf
551
+    #function_check matrix_generate_identityserver_file
552
+    #matrix_generate_identityserver_file /etc/sydent/sydent.conf
553
 
553
 
554
-    if [ ! -f /etc/sydent/sydent.conf ]; then
555
-        echo $'Matrix identity server configuration not generated'
556
-        exit 72528
557
-    fi
554
+    #if [ ! -f /etc/sydent/sydent.conf ]; then
555
+    #    echo $'Matrix identity server configuration not generated'
556
+    #    exit 72528
557
+    #fi
558
 
558
 
559
-    function_check matrix_configure_identityserver
560
-    matrix_configure_identityserver
561
-
562
-    if [ ! -f /etc/sydent/sydent.conf ]; then
563
-        echo $'Matrix identity server config was not generated'
564
-        exit 82352
565
-    fi
559
+    #function_check matrix_configure_identityserver
560
+    #matrix_configure_identityserver
566
 
561
 
567
     chmod -R 700 /etc/sydent/sydent.conf
562
     chmod -R 700 /etc/sydent/sydent.conf
568
     chown -R matrix:matrix /etc/sydent
563
     chown -R matrix:matrix /etc/sydent
575
     echo 'Type=simple' >> /etc/systemd/system/sydent.service
570
     echo 'Type=simple' >> /etc/systemd/system/sydent.service
576
     echo 'User=matrix' >> /etc/systemd/system/sydent.service
571
     echo 'User=matrix' >> /etc/systemd/system/sydent.service
577
     echo "WorkingDirectory=/etc/sydent" >> /etc/systemd/system/sydent.service
572
     echo "WorkingDirectory=/etc/sydent" >> /etc/systemd/system/sydent.service
578
-    echo "ExecStart=/usr/bin/python -m sydent.sydent --config-path /etc/sydent/sydent.conf" >> /etc/systemd/system/sydent.service
573
+    echo "ExecStart=/usr/bin/python -m sydent.sydent --config-path /etc/sydent/sydent.conf --report-stats ${REPORT_STATS} --server-name ${DEFAULT_DOMAIN_NAME}" >> /etc/systemd/system/sydent.service
579
     echo 'Restart=always' >> /etc/systemd/system/sydent.service
574
     echo 'Restart=always' >> /etc/systemd/system/sydent.service
580
     echo 'RestartSec=10' >> /etc/systemd/system/sydent.service
575
     echo 'RestartSec=10' >> /etc/systemd/system/sydent.service
581
     echo '' >> /etc/systemd/system/sydent.service
576
     echo '' >> /etc/systemd/system/sydent.service
585
     systemctl daemon-reload
580
     systemctl daemon-reload
586
     systemctl start sydent
581
     systemctl start sydent
587
 
582
 
583
+    sleep 5
584
+
585
+    if [ ! -f /etc/sydent/sydent.conf ]; then
586
+        echo $'Matrix identity server config was not generated'
587
+        exit 82352
588
+    fi
589
+
588
     if [ ! -f /etc/sydent/sydent.db ]; then
590
     if [ ! -f /etc/sydent/sydent.db ]; then
589
         echo $'No matrix identity server database was created'
591
         echo $'No matrix identity server database was created'
590
         exit 7354383
592
         exit 7354383