From f5b9c456e4b0c44c37b1b2bc12bb075ad149954e Mon Sep 17 00:00:00 2001 From: Gredin 67 Date: Tue, 26 Jan 2021 22:17:45 +0100 Subject: [PATCH] correct python env --- conf/systemd.service | 2 +- scripts/install | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index 4464ae3..cd52f4f 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,7 +7,7 @@ Type=simple User=__APP__ Group=__APP__ WorkingDirectory=__FINALPATH__/ -ExecStart=__FINALPATH__/mautrix_facebook >> /var/log/__APP__/__APP__.log 2>&1 +ExecStart=__FINALPATH__/bin/python3 -m mautrix_facebook >> /var/log/__APP__/__APP__.log 2>&1 [Install] WantedBy=multi-user.target diff --git a/scripts/install b/scripts/install index cda866f..3415e20 100755 --- a/scripts/install +++ b/scripts/install @@ -207,10 +207,9 @@ ynh_replace_string --match_string=__LOG_LEVEL__ --replace_string="error" --targe # Configure Mautrix-Facebook python3 -m venv $final_path -source venv/bin/activate -venv/bin/pip3 install --upgrade setuptools -venv/bin/pip3 install --upgrade $final_path/src/mautrix-facebook.tar.gz -venv/bin/python3 -m mautrix-facebook -g -c $mautrix_config_path -r $app_service_registration_path/$app.yaml +$final_path/bin/pip3 install --upgrade setuptools +$final_path/bin/pip3 install --upgrade $final_path/src/mautrix-facebook.tar.gz +$final_path/bin/python3 -m mautrix-facebook -g -c $mautrix_config_path -r $app_service_registration_path/$app.yaml /opt/yunohost/matrix-$synapse_instance/update_synapse_for_appservice.sh \ || ynh_die "Synapse can't restart with the appservice configuration"