diff --git a/src/freedombone-app-matrix b/src/freedombone-app-matrix index edc79ca7..27dd8da6 100755 --- a/src/freedombone-app-matrix +++ b/src/freedombone-app-matrix @@ -130,6 +130,9 @@ function add_user_matrix { ${PROJECT_NAME}-pass -u $new_username -a matrix -p "$new_user_password" read_config_param 'MATRIX_SECRET' + if [ -f /var/lib/matrix/.synapse/bin/activate ]; then + source /var/lib/matrix/.synapse/bin/activate + fi register_new_matrix_user -c ${MATRIX_DATA_DIR}/homeserver.yaml https://localhost:${MATRIX_PORT} -u "${new_username}" -p "${new_user_password}" -a if [ ! "$?" = "0" ]; then echo '1' @@ -349,7 +352,7 @@ function install_matrix { echo 'Type=simple' >> /etc/systemd/system/matrix.service echo 'User=matrix' >> /etc/systemd/system/matrix.service echo "WorkingDirectory=/etc/matrix" >> /etc/systemd/system/matrix.service - echo "ExecStart=source /var/lib/matrix/.synapse/bin/activate && /usr/bin/python -m synapse.app.homeserver --config-path ${MATRIX_DATA_DIR}/homeserver.yaml" >> /etc/systemd/system/matrix.service + echo "ExecStart=/usr/bin/python -m synapse.app.homeserver --config-path ${MATRIX_DATA_DIR}/homeserver.yaml" >> /etc/systemd/system/matrix.service echo 'Restart=always' >> /etc/systemd/system/matrix.service echo 'RestartSec=10' >> /etc/systemd/system/matrix.service echo '' >> /etc/systemd/system/matrix.service