diff --git a/conf/systemd.service b/conf/systemd.service index d339abb..df52bfe 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,7 +7,7 @@ Type=simple User=__APP__ Group=__APP__ Environment=PYTHONUNBUFFERED=1 -Environment=PATH=__FINALPATH__/venv/bin +Environment=PATH=__ENV_PATH__ WorkingDirectory=__FINALPATH__/ ExecStart=__FINALPATH__/venv/bin/python bazarr.py StandardOutput=append:/var/log/__APP__/__APP__.log diff --git a/scripts/install b/scripts/install index f32f37b..447855f 100755 --- a/scripts/install +++ b/scripts/install @@ -121,6 +121,8 @@ popd #================================================= ynh_script_progression --message="Configuring a systemd service..." --weight=1 +env_path="$final_path/venv/bin:$PATH" + # Create a dedicated systemd config ynh_add_systemd_config diff --git a/scripts/upgrade b/scripts/upgrade index 04654ca..99de2ac 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -139,6 +139,8 @@ ynh_multimedia_addaccess $app #================================================= ynh_script_progression --message="Upgrading systemd configuration..." --weight=1 +env_path="$final_path/venv/bin:$PATH" + # Create a dedicated systemd config ynh_add_systemd_config