From 760d214b8f8da2501368d2bcd407a7dc1a60b5d5 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sun, 6 Feb 2022 11:52:49 +0000 Subject: [PATCH 1/4] Load standard environment PATH for service --- conf/systemd.service | 2 +- scripts/install | 2 ++ scripts/upgrade | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) 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 From e6652bd7fc471c4cc71ba6ba81ee07410990a429 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sun, 6 Feb 2022 12:04:16 +0000 Subject: [PATCH 2/4] Do not overwrite config file during upgrade --- doc/DISCLAIMER.md | 3 +-- scripts/upgrade | 9 +++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md index ac242a3..fbe55e4 100644 --- a/doc/DISCLAIMER.md +++ b/doc/DISCLAIMER.md @@ -1,3 +1,2 @@ -- If Radarr or Sonarr are installed on your server, the app will automatically retrieve their settings and integrate them in its config. - - If you add or remove them afterwards, force an upgrade of Bazarr: it will update its settings again. +- If Radarr or Sonarr are installed beforehand on your server, the app will automatically retrieve their settings and integrate them in its config. - Enabling Auto-updating in the settings is discouraged and no support will be provided if you do so. diff --git a/scripts/upgrade b/scripts/upgrade index 99de2ac..feda30c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -117,12 +117,13 @@ popd #================================================= # UPDATE A CONFIG FILE #================================================= -ynh_script_progression --message="Updating a configuration file..." --weight=1 +#FIXME: Find a way not to override all settings while upgrading the config file. +#ynh_script_progression --message="Updating a configuration file..." --weight=1 -ynh_add_config --template="config.ini" --destination="$final_path/data/config/config.ini" +#ynh_add_config --template="config.ini" --destination="$final_path/data/config/config.ini" -chmod 660 "$final_path/data/config/config.ini" -chown $app: "$final_path/data/config/config.ini" +#chmod 660 "$final_path/data/config/config.ini" +#chown $app: "$final_path/data/config/config.ini" #================================================= # YUNOHOST MULTIMEDIA INTEGRATION From 9517b64198aa518ac097a8a6a70959e9ea71d5ea Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 7 Feb 2022 21:27:26 +0100 Subject: [PATCH 3/4] Bump package version --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index d7fc503..e56bd92 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Automated subtitle downloading for Sonarr and Radarr", "fr": "Téléchargement automatique de sous-titres pour Sonarr et Radarr" }, - "version": "1.0.1~ynh2", + "version": "1.0.1~ynh3", "url": "https://bazarr.media", "upstream": { "license": "GPL-3.0", From 270dd83f83e089bca4c750234bd7f444e110538b Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Mon, 7 Feb 2022 20:27:28 +0000 Subject: [PATCH 4/4] Auto-update README --- README.md | 5 ++--- README_fr.md | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b6d6f64..0f46ce8 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Bazarr is a companion application to Sonarr and Radarr that manages and download - Subtitles upgrade whenever better ones are released -**Shipped version:** 1.0.1~ynh2 +**Shipped version:** 1.0.1~ynh3 @@ -34,8 +34,7 @@ Bazarr is a companion application to Sonarr and Radarr that manages and download ## Disclaimers / important information -- If Radarr or Sonarr are installed on your server, the app will automatically retrieve their settings and integrate them in its config. - - If you add or remove them afterwards, force an upgrade of Bazarr: it will update its settings again. +- If Radarr or Sonarr are installed beforehand on your server, the app will automatically retrieve their settings and integrate them in its config. - Enabling Auto-updating in the settings is discouraged and no support will be provided if you do so. ## Documentation and resources diff --git a/README_fr.md b/README_fr.md index 6950e91..7ddafed 100644 --- a/README_fr.md +++ b/README_fr.md @@ -20,7 +20,7 @@ Bazarr is a companion application to Sonarr and Radarr that manages and download - Subtitles upgrade whenever better ones are released -**Version incluse :** 1.0.1~ynh2 +**Version incluse :** 1.0.1~ynh3 @@ -30,8 +30,7 @@ Bazarr is a companion application to Sonarr and Radarr that manages and download ## Avertissements / informations importantes -- If Radarr or Sonarr are installed on your server, the app will automatically retrieve their settings and integrate them in its config. - - If you add or remove them afterwards, force an upgrade of Bazarr: it will update its settings again. +- If Radarr or Sonarr are installed beforehand on your server, the app will automatically retrieve their settings and integrate them in its config. - Enabling Auto-updating in the settings is discouraged and no support will be provided if you do so. ## Documentations et ressources