From a90650484ff89ada6459dbba2f832f8f9c180f92 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Fri, 24 Feb 2023 00:31:44 +0100 Subject: [PATCH 01/26] [autopatch] Upgrade auto-updater --- .github/workflows/updater.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/updater.yml b/.github/workflows/updater.yml index 6fe6d72..a9ca97a 100644 --- a/.github/workflows/updater.yml +++ b/.github/workflows/updater.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Fetch the source code - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: token: ${{ secrets.GITHUB_TOKEN }} - name: Run the updater script @@ -33,7 +33,7 @@ jobs: - name: Create Pull Request id: cpr if: ${{ env.PROCEED == 'true' }} - uses: peter-evans/create-pull-request@v3 + uses: peter-evans/create-pull-request@v4 with: token: ${{ secrets.GITHUB_TOKEN }} commit-message: Update to version ${{ env.VERSION }} From 2bf72629c2879d8a637051676f8397c4d9f6b076 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 23 Feb 2023 23:31:46 +0000 Subject: [PATCH 02/26] Auto-update README --- README.md | 3 ++- README_fr.md | 21 +++++++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 22a5453..c814326 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,8 @@ It shall NOT be edited by hand. # Radarr for YunoHost -[![Integration level](https://dash.yunohost.org/integration/radarr.svg)](https://dash.yunohost.org/appci/app/radarr) ![Working status](https://ci-apps.yunohost.org/ci/badges/radarr.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/radarr.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/radarr.svg)](https://dash.yunohost.org/appci/app/radarr) ![Working status](https://ci-apps.yunohost.org/ci/badges/radarr.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/radarr.maintain.svg) + [![Install Radarr with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=radarr) *[Lire ce readme en français.](./README_fr.md)* diff --git a/README_fr.md b/README_fr.md index 1375b6f..42b5888 100644 --- a/README_fr.md +++ b/README_fr.md @@ -5,23 +5,24 @@ It shall NOT be edited by hand. # Radarr pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/radarr.svg)](https://dash.yunohost.org/appci/app/radarr) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/radarr.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/radarr.maintain.svg) +[![Niveau d’intégration](https://dash.yunohost.org/integration/radarr.svg)](https://dash.yunohost.org/appci/app/radarr) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/radarr.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/radarr.maintain.svg) + [![Installer Radarr avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=radarr) *[Read this readme in english.](./README.md)* -> *Ce package vous permet d'installer Radarr rapidement et simplement sur un serveur YunoHost. -Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* +> *Ce package vous permet d’installer Radarr rapidement et simplement sur un serveur YunoHost. +Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l’installer et en profiter.* -## Vue d'ensemble +## Vue d’ensemble Gestionnaire de filmothèque pour utilisateurs de Usenet et BitTorrent **Version incluse :** 4.3.2.6857~ynh1 -## Captures d'écran +## Captures d’écran -![Capture d'écran de Radarr](./doc/screenshots/screenshot.jpg) +![Capture d’écran de Radarr](./doc/screenshots/screenshot.jpg) ## Avertissements / informations importantes @@ -32,9 +33,9 @@ Gestionnaire de filmothèque pour utilisateurs de Usenet et BitTorrent ## Documentations et ressources -* Site officiel de l'app : -* Documentation officielle de l'admin : -* Dépôt de code officiel de l'app : +* Site officiel de l’app : +* Documentation officielle de l’admin : +* Dépôt de code officiel de l’app : * Documentation YunoHost pour cette app : * Signaler un bug : @@ -50,4 +51,4 @@ ou sudo yunohost app upgrade radarr -u https://github.com/YunoHost-Apps/radarr_ynh/tree/testing --debug ``` -**Plus d'infos sur le packaging d'applications :** +**Plus d’infos sur le packaging d’applications :** \ No newline at end of file From bbd062d9511dd2f5658ce9f590b6e2e1106e7014 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 29 May 2023 06:07:19 +0000 Subject: [PATCH 03/26] Upgrade to v4.5.2.7388 --- conf/app.arm.src | 4 ++-- conf/app.arm64.src | 4 ++-- conf/app.x64.src | 4 ++-- manifest.json | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/conf/app.arm.src b/conf/app.arm.src index de3fd1c..42d2912 100644 --- a/conf/app.arm.src +++ b/conf/app.arm.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Radarr/Radarr/releases/download/v4.3.2.6857/Radarr.master.4.3.2.6857.linux-core-arm.tar.gz -SOURCE_SUM=20e8b2f3734327495af285e70b32fccb3c52a1794a723d2d69ef50973a2382d1 +SOURCE_URL=https://github.com/Radarr/Radarr/releases/download/v4.5.2.7388/Radarr.master.4.5.2.7388.linux-core-arm.tar.gz +SOURCE_SUM=fb28ab5afd644a867d9e294df7e31f888ddeb059cc33e403fe7470c7c65aa160 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/app.arm64.src b/conf/app.arm64.src index e16e7c4..620744c 100644 --- a/conf/app.arm64.src +++ b/conf/app.arm64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Radarr/Radarr/releases/download/v4.3.2.6857/Radarr.master.4.3.2.6857.linux-core-arm64.tar.gz -SOURCE_SUM=3aa4e2ae25cec14ebc911000d54f8764bcb4eb602dca495de5aa30e7a11cd37b +SOURCE_URL=https://github.com/Radarr/Radarr/releases/download/v4.5.2.7388/Radarr.master.4.5.2.7388.linux-core-arm64.tar.gz +SOURCE_SUM=d6a1b1deb33cb232e1cc2367c948d35acf8418bce69b5da1fe8d3c426bd7c6db SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/app.x64.src b/conf/app.x64.src index e06216e..0218145 100644 --- a/conf/app.x64.src +++ b/conf/app.x64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Radarr/Radarr/releases/download/v4.3.2.6857/Radarr.master.4.3.2.6857.linux-core-x64.tar.gz -SOURCE_SUM=ece6681ef0c92015e88143c774aa6189a8ed08138ea2e48f7bfa60645df4b52f +SOURCE_URL=https://github.com/Radarr/Radarr/releases/download/v4.5.2.7388/Radarr.master.4.5.2.7388.linux-core-x64.tar.gz +SOURCE_SUM=04928497be5536bd9d37f3f535e62e3989ab0c910873ca464b6aecce26d519b4 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index abb1bc7..2a98538 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Movie collection manager for Usenet and BitTorrent users", "fr": "Gestionnaire de filmothèque pour utilisateurs de Usenet et BitTorrent" }, - "version": "4.3.2.6857~ynh1", + "version": "4.5.2.7388~ynh1", "url": "https://radarr.video", "upstream": { "license": "GPL-3.0-only", From b80e99d4502181dd03d4ff5dbb7b648ca3344e5b Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 29 May 2023 06:07:24 +0000 Subject: [PATCH 04/26] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c814326..26bc44b 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Movie collection manager for Usenet and BitTorrent users -**Shipped version:** 4.3.2.6857~ynh1 +**Shipped version:** 4.5.2.7388~ynh1 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 42b5888..2d60c31 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Gestionnaire de filmothèque pour utilisateurs de Usenet et BitTorrent -**Version incluse :** 4.3.2.6857~ynh1 +**Version incluse :** 4.5.2.7388~ynh1 ## Captures d’écran From e80acf06c0eab3eb3cf5ddb12ea4eeaeb3585b58 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 14 Aug 2023 06:07:08 +0000 Subject: [PATCH 05/26] Upgrade to v4.7.5.7809 --- conf/app.arm.src | 4 ++-- conf/app.arm64.src | 4 ++-- conf/app.x64.src | 4 ++-- manifest.json | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/conf/app.arm.src b/conf/app.arm.src index 42d2912..15e01b5 100644 --- a/conf/app.arm.src +++ b/conf/app.arm.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Radarr/Radarr/releases/download/v4.5.2.7388/Radarr.master.4.5.2.7388.linux-core-arm.tar.gz -SOURCE_SUM=fb28ab5afd644a867d9e294df7e31f888ddeb059cc33e403fe7470c7c65aa160 +SOURCE_URL=https://github.com/Radarr/Radarr/releases/download/v4.7.5.7809/Radarr.master.4.7.5.7809.linux-core-arm.tar.gz +SOURCE_SUM=00972d3d587f214c1b3a446c5db2d9ef0823edba5a311670f81d6038bb11c1be SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/app.arm64.src b/conf/app.arm64.src index 620744c..e293d60 100644 --- a/conf/app.arm64.src +++ b/conf/app.arm64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Radarr/Radarr/releases/download/v4.5.2.7388/Radarr.master.4.5.2.7388.linux-core-arm64.tar.gz -SOURCE_SUM=d6a1b1deb33cb232e1cc2367c948d35acf8418bce69b5da1fe8d3c426bd7c6db +SOURCE_URL=https://github.com/Radarr/Radarr/releases/download/v4.7.5.7809/Radarr.master.4.7.5.7809.linux-core-arm64.tar.gz +SOURCE_SUM=82cc30caaf5920e6f0adcb3a3c006170de2c685f150d01cba4fdadac09d549c9 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/app.x64.src b/conf/app.x64.src index 0218145..4c82613 100644 --- a/conf/app.x64.src +++ b/conf/app.x64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Radarr/Radarr/releases/download/v4.5.2.7388/Radarr.master.4.5.2.7388.linux-core-x64.tar.gz -SOURCE_SUM=04928497be5536bd9d37f3f535e62e3989ab0c910873ca464b6aecce26d519b4 +SOURCE_URL=https://github.com/Radarr/Radarr/releases/download/v4.7.5.7809/Radarr.master.4.7.5.7809.linux-core-x64.tar.gz +SOURCE_SUM=634f262eafe5a56ab071f7cf7332fe9ed4bb0962e63a0cfd8ab7db84829b2f90 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 2a98538..c95df76 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Movie collection manager for Usenet and BitTorrent users", "fr": "Gestionnaire de filmothèque pour utilisateurs de Usenet et BitTorrent" }, - "version": "4.5.2.7388~ynh1", + "version": "4.7.5.7809~ynh1", "url": "https://radarr.video", "upstream": { "license": "GPL-3.0-only", From c2ebf1c2b82e8a7db330f021ea16ceacfa07edc2 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 14 Aug 2023 06:07:14 +0000 Subject: [PATCH 06/26] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 26bc44b..b1a0983 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Movie collection manager for Usenet and BitTorrent users -**Shipped version:** 4.5.2.7388~ynh1 +**Shipped version:** 4.7.5.7809~ynh1 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 2d60c31..5181828 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Gestionnaire de filmothèque pour utilisateurs de Usenet et BitTorrent -**Version incluse :** 4.5.2.7388~ynh1 +**Version incluse :** 4.7.5.7809~ynh1 ## Captures d’écran From 9e6355111a4409b1719ba8ef51b8621da7767684 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 11 Sep 2023 06:52:11 +0000 Subject: [PATCH 07/26] Update service start detection --- scripts/change_url | 2 +- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 0a5fd03..d41bacd 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -125,7 +125,7 @@ chown $app "$data_path/config.xml" #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=2 -ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Starting Web Server" --timeout=30 +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Application started" --timeout=30 #================================================= # RELOAD NGINX diff --git a/scripts/install b/scripts/install index f98125a..d1623c1 100755 --- a/scripts/install +++ b/scripts/install @@ -171,7 +171,7 @@ yunohost service add $app --description="Radarr daemon" --log="$data_path/logs/r ynh_script_progression --message="Starting a systemd service..." --weight=2 # Start a systemd service -ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Starting Web Server" --timeout=30 +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Application started" --timeout=30 #================================================= # SETUP SSOWAT diff --git a/scripts/restore b/scripts/restore index 4ae52d8..7ba7cf7 100755 --- a/scripts/restore +++ b/scripts/restore @@ -126,7 +126,7 @@ yunohost service add $app --description="Radarr daemon" --log="$data_path/logs/r #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=2 -ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Starting Web Server" --timeout=30 +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Application started" --timeout=30 #================================================= # RESTORE THE LOGROTATE CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index 0f99ae4..b7b9a3d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -165,7 +165,7 @@ yunohost service add $app --description="Radarr daemon" --log="$data_path/logs/r #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=2 -ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Starting Web Server" --timeout=30 +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Application started" --timeout=30 #================================================= # RELOAD NGINX From 05a68a5d4109023d9d6981999224bf1d09d2559a Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 11 Sep 2023 06:56:21 +0000 Subject: [PATCH 08/26] Update config.xml --- conf/config.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/conf/config.xml b/conf/config.xml index e9e4e49..ae3f2f2 100644 --- a/conf/config.xml +++ b/conf/config.xml @@ -6,11 +6,13 @@ __PORT__ __PATH__ __API_KEY__ - None - External + Forms + BuiltIn develop __PORT__ False False + Radarr + DisabledForLocalAddresses From 4af0b9903f09ebaf87b767ffd46f3c012cce655f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 1 Apr 2023 19:49:49 +0200 Subject: [PATCH 09/26] v2 --- conf/app.arm.src | 5 --- conf/app.arm64.src | 5 --- conf/app.x64.src | 5 --- conf/systemd.service | 4 +-- manifest.json | 49 ------------------------------ manifest.toml | 64 +++++++++++++++++++++++++++++++++++++++ scripts/_common.sh | 2 +- scripts/backup | 16 +++++----- scripts/change_url | 72 +++++++++++++++++++++++--------------------- scripts/install | 64 +++++++++++++++++++-------------------- scripts/remove | 24 +++++++-------- scripts/restore | 38 +++++++++++------------ scripts/upgrade | 56 +++++++++++++++++----------------- 13 files changed, 203 insertions(+), 201 deletions(-) delete mode 100644 conf/app.arm.src delete mode 100644 conf/app.arm64.src delete mode 100644 conf/app.x64.src delete mode 100644 manifest.json create mode 100644 manifest.toml diff --git a/conf/app.arm.src b/conf/app.arm.src deleted file mode 100644 index 15e01b5..0000000 --- a/conf/app.arm.src +++ /dev/null @@ -1,5 +0,0 @@ -SOURCE_URL=https://github.com/Radarr/Radarr/releases/download/v4.7.5.7809/Radarr.master.4.7.5.7809.linux-core-arm.tar.gz -SOURCE_SUM=00972d3d587f214c1b3a446c5db2d9ef0823edba5a311670f81d6038bb11c1be -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=true diff --git a/conf/app.arm64.src b/conf/app.arm64.src deleted file mode 100644 index e293d60..0000000 --- a/conf/app.arm64.src +++ /dev/null @@ -1,5 +0,0 @@ -SOURCE_URL=https://github.com/Radarr/Radarr/releases/download/v4.7.5.7809/Radarr.master.4.7.5.7809.linux-core-arm64.tar.gz -SOURCE_SUM=82cc30caaf5920e6f0adcb3a3c006170de2c685f150d01cba4fdadac09d549c9 -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=true diff --git a/conf/app.x64.src b/conf/app.x64.src deleted file mode 100644 index 4c82613..0000000 --- a/conf/app.x64.src +++ /dev/null @@ -1,5 +0,0 @@ -SOURCE_URL=https://github.com/Radarr/Radarr/releases/download/v4.7.5.7809/Radarr.master.4.7.5.7809.linux-core-x64.tar.gz -SOURCE_SUM=634f262eafe5a56ab071f7cf7332fe9ed4bb0962e63a0cfd8ab7db84829b2f90 -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=true diff --git a/conf/systemd.service b/conf/systemd.service index 24f0d6d..eef7b01 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -6,8 +6,8 @@ After=syslog.target network.target Type=simple User=__APP__ Group=__APP__ -WorkingDirectory=__FINALPATH__/ -ExecStart=__FINALPATH__/Radarr -nobrowser -data=__DATA_PATH__ +WorkingDirectory=__INSTALL_DIR__/ +ExecStart=__INSTALL_DIR__/Radarr -nobrowser -data=__DATA_PATH__ TimeoutStopSec=20 KillMode=process diff --git a/manifest.json b/manifest.json deleted file mode 100644 index c95df76..0000000 --- a/manifest.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "Radarr", - "id": "radarr", - "packaging_format": 1, - "description": { - "en": "Movie collection manager for Usenet and BitTorrent users", - "fr": "Gestionnaire de filmothèque pour utilisateurs de Usenet et BitTorrent" - }, - "version": "4.7.5.7809~ynh1", - "url": "https://radarr.video", - "upstream": { - "license": "GPL-3.0-only", - "website": "https://radarr.video", - "admindoc": "https://wiki.servarr.com/Radarr", - "code": "https://github.com/Radarr/Radarr" - }, - "license": "GPL-3.0-only", - "maintainer": { - "name": "tituspijean", - "email": "tituspijean@outlook.com" - }, - "requirements": { - "yunohost": ">= 4.3" - }, - "multi_instance": true, - "services": [ - "nginx", - "php7.3-fpm", - "mysql" - ], - "arguments": { - "install": [ - { - "name": "domain", - "type": "domain" - }, - { - "name": "path", - "type": "path", - "default": "/radarr", - "example": "/radarr" - }, - { - "name": "admin", - "type": "user" - } - ] - } -} diff --git a/manifest.toml b/manifest.toml new file mode 100644 index 0000000..2f3613b --- /dev/null +++ b/manifest.toml @@ -0,0 +1,64 @@ +packaging_format = 2 + +id = "radarr" +name = "Radarr" +description.en = "Movie collection manager for Usenet and BitTorrent users" +description.fr = "Gestionnaire de filmothèque pour utilisateurs de Usenet et BitTorrent" + +version = "4.3.2.6857~ynh1" + +maintainers = ["tituspijean"] + +[upstream] +license = "GPL-3.0-only" +website = "https://radarr.video" +admindoc = "https://wiki.servarr.com/Radarr" +code = "https://github.com/Radarr/Radarr" +fund = "https://radarr.video/donate" + +[integration] +yunohost = ">= 11.2" +architectures = ["armhf", "arm64", "amd64", "i386"] +multi_instance = true +ldap = false +sso = false +disk = "50M" # FIXME: replace with an **estimate** minimum disk requirement. e.g. 20M, 400M, 1G, ... +ram.build = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... +ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... + +[install] + [install.domain] + type = "domain" + + [install.path] + type = "path" + default = "/radarr" + + [install.init_main_permission] + type = "group" + help.en = "Logging in is disabled for Radarr on YunoHost, use this permission to manage who will have access." + help.fr = "La connexion est désactivée pour Radarr sur YunoHost, utilisez cette permission pour gérer qui y aura accès." + +[resources] + [resources.sources.main] + armhf.url = "https://github.com/Radarr/Radarr/releases/download/v4.7.5.7809/Radarr.master.4.7.5.7809.linux-core-arm.tar.gz" + armhf.sha256 = "00972d3d587f214c1b3a446c5db2d9ef0823edba5a311670f81d6038bb11c1be" + arm64.url = "https://github.com/Radarr/Radarr/releases/download/v4.7.5.7809/Radarr.master.4.7.5.7809.linux-core-arm64.tar.gz" + arm64.sha256 = "82cc30caaf5920e6f0adcb3a3c006170de2c685f150d01cba4fdadac09d549c9" + amd64.url = "https://github.com/Radarr/Radarr/releases/download/v4.7.5.7809/Radarr.master.4.7.5.7809.linux-core-x64.tar.gz" + amd64.sha256 = "634f262eafe5a56ab071f7cf7332fe9ed4bb0962e63a0cfd8ab7db84829b2f90" + i386.url = "https://github.com/Radarr/Radarr/releases/download/v4.7.5.7809/Radarr.master.4.7.5.7809.linux-core-x86.tar.gz" + i386.sha256 = "e5ae54b2fdd2e310bdd720ce8b6e0bd9ebe4c9500a4af72c092bf8da052108e1" + + autoupdate.strategy = "latest_github_release" + autoupdate.asset.armhf = ".*linux-core-arm.tar.gz" + autoupdate.asset.arm64 = ".*linux-core-arm64.tar.gz" + autoupdate.asset.amd64 = ".*linux-core-x64.tar.gz" + autoupdate.asset.i386 = ".*linux-core-x86.tar.gz" + + [resources.system_user] + + [resources.install_dir] + + [resources.permissions] + main.url = "/" diff --git a/scripts/_common.sh b/scripts/_common.sh index 8abad26..e2912a9 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -10,7 +10,7 @@ version="3.2.2.5080" supported_architectures=("arm" "arm64" "x64") # dependencies used by the app -pkg_dependencies="curl mediainfo sqlite3" +#REMOVEME? pkg_dependencies="curl mediainfo sqlite3" #================================================= # PERSONAL HELPERS diff --git a/scripts/backup b/scripts/backup index 8555a32..f9c07a4 100755 --- a/scripts/backup +++ b/scripts/backup @@ -14,23 +14,23 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -ynh_clean_setup () { +#REMOVEME? ynh_clean_setup () { ### Remove this function if there's nothing to clean before calling the remove script. true } # Exit if an error occurs during the execution of the script -ynh_abort_if_errors +#REMOVEME? ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_print_info --message="Loading installation settings..." +#REMOVEME? ynh_print_info --message="Loading installation settings..." -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME -final_path=$(ynh_app_setting_get --app=$app --key=final_path) -data_path=$(ynh_app_setting_get --app=$app --key=data_path) -domain=$(ynh_app_setting_get --app=$app --key=domain) +#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) +#REMOVEME? data_path=$(ynh_app_setting_get --app=$app --key=data_path) +#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) #================================================= # DECLARE DATA AND CONF FILES TO BACKUP @@ -46,7 +46,7 @@ ynh_print_info --message="Declaring files to be backed up..." # BACKUP THE APP MAIN DIR #================================================= -ynh_backup --src_path="$final_path" +ynh_backup --src_path="$install_dir" #================================================= # BACKUP THE APP DATA DIR diff --git a/scripts/change_url b/scripts/change_url index d41bacd..6793094 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -13,56 +13,56 @@ source /usr/share/yunohost/helpers # RETRIEVE ARGUMENTS #================================================= -old_domain=$YNH_APP_OLD_DOMAIN -old_path=$YNH_APP_OLD_PATH +#REMOVEME? old_domain=$YNH_APP_OLD_DOMAIN +#REMOVEME? old_path=$YNH_APP_OLD_PATH -new_domain=$YNH_APP_NEW_DOMAIN -new_path=$YNH_APP_NEW_PATH +#REMOVEME? new_domain=$YNH_APP_NEW_DOMAIN +#REMOVEME? new_path=$YNH_APP_NEW_PATH -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 +#REMOVEME? ynh_script_progression --message="Loading installation settings..." --weight=1 -# Needed for helper "ynh_add_nginx_config" -final_path=$(ynh_app_setting_get --app=$app --key=final_path) -data_path=$(ynh_app_setting_get --app=$app --key=data_path) -port=$(ynh_app_setting_get --app=$app --key=port) -api_key=$(ynh_app_setting_get --app=$app --key=api_key) +#REMOVEME? # Needed for helper "ynh_add_nginx_config" +#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) +#REMOVEME? data_path=$(ynh_app_setting_get --app=$app --key=data_path) +#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port) +#REMOVEME? api_key=$(ynh_app_setting_get --app=$app --key=api_key) #================================================= # BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=3 +#REMOVEME? ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=3 # Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { +#REMOVEME? ynh_backup_before_upgrade +#REMOVEME? ynh_clean_setup () { # Remove the new domain config file, the remove script won't do it as it doesn't know yet its location. - ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" +#REMOVEME? ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" # Restore it if the upgrade fails - ynh_restore_upgradebackup +#REMOVEME? ynh_restore_upgradebackup } # Exit if an error occurs during the execution of the script -ynh_abort_if_errors +#REMOVEME? ynh_abort_if_errors #================================================= # CHECK WHICH PARTS SHOULD BE CHANGED #================================================= -change_domain=0 -if [ "$old_domain" != "$new_domain" ] +#REMOVEME? change_domain=0 +#REMOVEME? if [ "$old_domain" != "$new_domain" ] then - change_domain=1 + #REMOVEME? change_domain=1 fi -change_path=0 -if [ "$old_path" != "$new_path" ] +#REMOVEME? change_path=0 +#REMOVEME? if [ "$old_path" != "$new_path" ] then - change_path=1 + #REMOVEME? change_path=1 fi #================================================= @@ -79,31 +79,33 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" #================================================= ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1 -nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf +ynh_change_url_nginx_config + +#REMOVEME? nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf # Change the path in the NGINX config file if [ $change_path -eq 1 ] then # Make a backup of the original NGINX config file if modified - ynh_backup_if_checksum_is_different --file="$nginx_conf_path" +#REMOVEME? ynh_backup_if_checksum_is_different --file="$nginx_conf_path" # Set global variables for NGINX helper - domain="$old_domain" - path_url="$new_path" - path="$new_path" +#REMOVEME? domain="$old_domain" +#REMOVEME? path="$new_path" +#REMOVEME? path="$new_path" # Create a dedicated NGINX config - ynh_add_nginx_config +#REMOVEME? ynh_add_nginx_config else - path="$old_path" +#REMOVEME? path="$old_path" fi # Change the domain for NGINX if [ $change_domain -eq 1 ] then # Delete file checksum for the old conf file location - ynh_delete_file_checksum --file="$nginx_conf_path" - mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf +#REMOVEME? ynh_delete_file_checksum --file="$nginx_conf_path" +#REMOVEME? mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf # Store file checksum for the new config file location - ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" +#REMOVEME? ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" fi #================================================= @@ -130,9 +132,9 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --l #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 +#REMOVEME? ynh_script_progression --message="Reloading NGINX web server..." --weight=1 -ynh_systemd_action --service_name=nginx --action=reload +#REMOVEME? #REMOVEME? ynh_systemd_action --service_name=nginx --action=reload #================================================= # END OF SCRIPT diff --git a/scripts/install b/scripts/install index d1623c1..e219011 100755 --- a/scripts/install +++ b/scripts/install @@ -13,71 +13,71 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -ynh_clean_setup () { +#REMOVEME? ynh_clean_setup () { ### Remove this function if there's nothing to clean before calling the remove script. true } # Exit if an error occurs during the execution of the script -ynh_abort_if_errors +#REMOVEME? ynh_abort_if_errors #================================================= # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= -domain=$YNH_APP_ARG_DOMAIN -path_url=$YNH_APP_ARG_PATH -admin=$YNH_APP_ARG_ADMIN +#REMOVEME? domain=$YNH_APP_ARG_DOMAIN +#REMOVEME? path=$YNH_APP_ARG_PATH +#REMOVEME? admin=$YNH_APP_ARG_ADMIN -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= -ynh_script_progression --message="Validating installation parameters..." --weight=1 +#REMOVEME? ynh_script_progression --message="Validating installation parameters..." --weight=1 -final_path=/opt/yunohost/$app -test ! -e "$final_path" || ynh_die --message="Installation path ($final_path) already exists" +#REMOVEME? install_dir=/opt/yunohost/$app +#REMOVEME? test ! -e "$install_dir" || ynh_die --message="Installation path ($install_dir) already exists" data_path=/home/yunohost.app/$app test ! -e "$data_path" || ynh_die --message="Data directory ($data_path) already exists" # Register (book) web path -ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url +#REMOVEME? ynh_webpath_register --app=$app --domain=$domain --path=$path #================================================= # STORE SETTINGS FROM MANIFEST #================================================= -ynh_script_progression --message="Storing installation settings..." --weight=1 +#REMOVEME? ynh_script_progression --message="Storing installation settings..." --weight=1 -ynh_app_setting_set --app=$app --key=domain --value=$domain -ynh_app_setting_set --app=$app --key=path --value=$path_url -ynh_app_setting_set --app=$app --key=admin --value=$admin +#REMOVEME? ynh_app_setting_set --app=$app --key=domain --value=$domain +#REMOVEME? ynh_app_setting_set --app=$app --key=path --value=$path +#REMOVEME? ynh_app_setting_set --app=$app --key=admin --value=$admin #================================================= # STANDARD MODIFICATIONS #================================================= # FIND AND OPEN A PORT #================================================= -ynh_script_progression --message="Finding an available port..." --weight=1 +#REMOVEME? ynh_script_progression --message="Finding an available port..." --weight=1 # Find an available port -port=$(ynh_find_port --port=8095) -ynh_app_setting_set --app=$app --key=port --value=$port +#REMOVEME? port=$(ynh_find_port --port=8095) +#REMOVEME? ynh_app_setting_set --app=$app --key=port --value=$port #================================================= # INSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Installing dependencies..." --weight=4 +#REMOVEME? ynh_script_progression --message="Installing dependencies..." --weight=4 -ynh_install_app_dependencies $pkg_dependencies +#REMOVEME? ynh_install_app_dependencies $pkg_dependencies #================================================= # CREATE DEDICATED USER #================================================= -ynh_script_progression --message="Configuring system user..." --weight=1 +#REMOVEME? ynh_script_progression --message="Configuring system user..." --weight=1 # Create a system user -ynh_system_user_create --username=$app --home_dir="$final_path" +#REMOVEME? ynh_system_user_create --username=$app --home_dir="$install_dir" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -86,11 +86,11 @@ ynh_script_progression --message="Setting up source files..." --weight=3 get_architecture -ynh_app_setting_set --app=$app --key=final_path --value=$final_path +#REMOVEME? ynh_app_setting_set --app=$app --key=install_dir --value=$install_dir # Download, check integrity, uncompress and patch the source from app.src -ynh_setup_source --dest_dir="$final_path" --source_id="app.$architecture" +ynh_setup_source --dest_dir="$install_dir" -ynh_app_setting_set --app=$app --key=data_path --value=$data_path +#REMOVEME? ynh_app_setting_set --app=$app --key=data_path --value=$data_path mkdir -p "$data_path/logs" #================================================= @@ -126,9 +126,9 @@ ynh_add_config --template="../conf/config.xml" --destination="$data_path/config. #================================================= ynh_script_progression --message="Setting files permissions and ownership..." --weight=1 -chmod 750 "$final_path" -chmod -R o-rwx "$final_path" -chown -R $app: "$final_path" +chmod 750 "$install_dir" +chmod -R o-rwx "$install_dir" +chown -R $app: "$install_dir" chmod 750 "$data_path" chmod -R o-rwx "$data_path" @@ -176,18 +176,18 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --l #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring permissions..." --weight=1 +#REMOVEME? ynh_script_progression --message="Configuring permissions..." --weight=1 -ynh_permission_update --permission="main" --add="$admin" --remove="all_users" +#REMOVEME? ynh_permission_update --permission="main" --add="$admin" --remove="all_users" -ynh_permission_create --permission="api" --url="/api" --allowed="visitors" --show_tile="false" --protected="true" +#REMOVEME? ynh_permission_create --permission="api" --url="/api" --allowed="visitors" --show_tile="false" --protected="true" #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 +#REMOVEME? ynh_script_progression --message="Reloading NGINX web server..." --weight=1 -ynh_systemd_action --service_name=nginx --action=reload +#REMOVEME? ynh_systemd_action --service_name=nginx --action=reload #================================================= # END OF SCRIPT diff --git a/scripts/remove b/scripts/remove index 582f1c6..fdffcf9 100755 --- a/scripts/remove +++ b/scripts/remove @@ -12,14 +12,14 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 +#REMOVEME? ynh_script_progression --message="Loading installation settings..." --weight=1 -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get --app=$app --key=domain) -port=$(ynh_app_setting_get --app=$app --key=port) -final_path=$(ynh_app_setting_get --app=$app --key=final_path) -data_path=$(ynh_app_setting_get --app=$app --key=data_path) +#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) +#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port) +#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) +#REMOVEME? data_path=$(ynh_app_setting_get --app=$app --key=data_path) #================================================= # STANDARD REMOVE @@ -45,18 +45,18 @@ ynh_remove_systemd_config #================================================= # REMOVE DEPENDENCIES #================================================= -ynh_script_progression --message="Removing dependencies..." --weight=3 +#REMOVEME? ynh_script_progression --message="Removing dependencies..." --weight=3 # Remove metapackage and its dependencies -ynh_remove_app_dependencies +#REMOVEME? ynh_remove_app_dependencies #================================================= # REMOVE APP MAIN DIR #================================================= -ynh_script_progression --message="Removing app main directory..." --weight=1 +#REMOVEME? ynh_script_progression --message="Removing app main directory..." --weight=1 # Remove the app directory securely -ynh_secure_remove --file="$final_path" +#REMOVEME? ynh_secure_remove --file="$install_dir" #================================================= # REMOVE APP DATA DIR @@ -107,10 +107,10 @@ ynh_secure_remove --file="/var/log/$app" #================================================= # REMOVE DEDICATED USER #================================================= -ynh_script_progression --message="Removing the dedicated system user..." --weight=1 +#REMOVEME? ynh_script_progression --message="Removing the dedicated system user..." --weight=1 # Delete a system user -ynh_system_user_delete --username=$app +#REMOVEME? ynh_system_user_delete --username=$app #================================================= # END OF SCRIPT diff --git a/scripts/restore b/scripts/restore index 7ba7cf7..70e9338 100755 --- a/scripts/restore +++ b/scripts/restore @@ -14,32 +14,32 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -ynh_clean_setup () { +#REMOVEME? ynh_clean_setup () { #### Remove this function if there's nothing to clean before calling the remove script. true } # Exit if an error occurs during the execution of the script -ynh_abort_if_errors +#REMOVEME? ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 +#REMOVEME? ynh_script_progression --message="Loading installation settings..." --weight=1 -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get --app=$app --key=domain) -path_url=$(ynh_app_setting_get --app=$app --key=path) -final_path=$(ynh_app_setting_get --app=$app --key=final_path) -data_path=$(ynh_app_setting_get --app=$app --key=data_path) +#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) +#REMOVEME? path=$(ynh_app_setting_get --app=$app --key=path) +#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) +#REMOVEME? data_path=$(ynh_app_setting_get --app=$app --key=data_path) #================================================= # CHECK IF THE APP CAN BE RESTORED #================================================= -ynh_script_progression --message="Validating restoration parameters..." --weight=1 +#REMOVEME? ynh_script_progression --message="Validating restoration parameters..." --weight=1 -test ! -d $final_path \ - || ynh_die --message="There is already a directory: $final_path " +#REMOVEME? test ! -d $install_dir \ + || ynh_die --message="There is already a directory: $install_dir " test ! -d $data_path \ || ynh_die --message="There is already a directory: $data_path " @@ -56,21 +56,21 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # RECREATE THE DEDICATED USER #================================================= -ynh_script_progression --message="Recreating the dedicated system user..." --weight=1 +#REMOVEME? ynh_script_progression --message="Recreating the dedicated system user..." --weight=1 # Create the dedicated user (if not existing) -ynh_system_user_create --username=$app --home_dir="$final_path" +#REMOVEME? ynh_system_user_create --username=$app --home_dir="$install_dir" #================================================= # RESTORE THE APP MAIN DIR #================================================= ynh_script_progression --message="Restoring the app main directory..." --weight=2 -ynh_restore_file --origin_path="$final_path" +ynh_restore_file --origin_path="$install_dir" -chmod 750 "$final_path" -chmod -R o-rwx "$final_path" -chown -R $app:$app "$final_path" +chmod 750 "$install_dir" +chmod -R o-rwx "$install_dir" +chown -R $app:$app "$install_dir" #================================================= # RESTORE THE APP DATA DIR @@ -101,10 +101,10 @@ ynh_multimedia_addaccess $app #================================================= # REINSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Reinstalling dependencies..." --weight=4 +#REMOVEME? ynh_script_progression --message="Reinstalling dependencies..." --weight=4 # Define and install dependencies -ynh_install_app_dependencies $pkg_dependencies +#REMOVEME? ynh_install_app_dependencies $pkg_dependencies #================================================= # RESTORE SYSTEMD diff --git a/scripts/upgrade b/scripts/upgrade index b7b9a3d..40cc521 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -12,17 +12,17 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 +#REMOVEME? ynh_script_progression --message="Loading installation settings..." --weight=1 -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get --app=$app --key=domain) -path_url=$(ynh_app_setting_get --app=$app --key=path) -admin=$(ynh_app_setting_get --app=$app --key=admin) -port=$(ynh_app_setting_get --app=$app --key=port) -final_path=$(ynh_app_setting_get --app=$app --key=final_path) -data_path=$(ynh_app_setting_get --app=$app --key=data_path) -api_key=$(ynh_app_setting_get --app=$app --key=api_key) +#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) +#REMOVEME? path=$(ynh_app_setting_get --app=$app --key=path) +#REMOVEME? admin=$(ynh_app_setting_get --app=$app --key=admin) +#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port) +#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) +#REMOVEME? data_path=$(ynh_app_setting_get --app=$app --key=data_path) +#REMOVEME? api_key=$(ynh_app_setting_get --app=$app --key=api_key) #================================================= # CHECK VERSION @@ -39,16 +39,16 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=4 +#REMOVEME? ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=4 # Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { +#REMOVEME? ynh_backup_before_upgrade +#REMOVEME? ynh_clean_setup () { # Restore it if the upgrade fails - ynh_restore_upgradebackup +#REMOVEME? ynh_restore_upgradebackup } # Exit if an error occurs during the execution of the script -ynh_abort_if_errors +#REMOVEME? ynh_abort_if_errors #================================================= # STANDARD UPGRADE STEPS @@ -65,24 +65,24 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 # Create a permission if needed -if ! ynh_permission_exists --permission="api"; then - ynh_permission_create --permission="api" --url="/api" --allowed="visitors" --show_tile="false" --protected="true" +#REMOVEME? if ! ynh_permission_exists --permission="api"; then +#REMOVEME? ynh_permission_create --permission="api" --url="/api" --allowed="visitors" --show_tile="false" --protected="true" fi # Move data directory if needed if [ -z "$data_path" ]; then data_path=/home/yunohost.app/$app - ynh_app_setting_set --app=$app --key=data_path --value=$data_path - mv "$final_path/.data" "/home/yunohost.app/$app" +#REMOVEME? ynh_app_setting_set --app=$app --key=data_path --value=$data_path + mv "$install_dir/.data" "/home/yunohost.app/$app" fi #================================================= # CREATE DEDICATED USER #================================================= -ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 +#REMOVEME? ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 # Create a dedicated user (if not existing) -ynh_system_user_create --username=$app --home_dir="$final_path" +#REMOVEME? ynh_system_user_create --username=$app --home_dir="$install_dir" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -95,12 +95,12 @@ then get_architecture # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" --source_id="app.$architecture" + ynh_setup_source --dest_dir="$install_dir" fi -chmod 750 "$final_path" -chmod -R o-rwx "$final_path" -chown -R $app: "$final_path" +chmod 750 "$install_dir" +chmod -R o-rwx "$install_dir" +chown -R $app: "$install_dir" mkdir -p "$data_path/logs" chmod 750 "$data_path" @@ -118,9 +118,9 @@ ynh_add_nginx_config #================================================= # UPGRADE DEPENDENCIES #================================================= -ynh_script_progression --message="Upgrading dependencies..." --weight=4 +#REMOVEME? ynh_script_progression --message="Upgrading dependencies..." --weight=4 -ynh_install_app_dependencies $pkg_dependencies +#REMOVEME? ynh_install_app_dependencies $pkg_dependencies #================================================= # SPECIFIC UPGRADE @@ -170,9 +170,9 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --l #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 +#REMOVEME? ynh_script_progression --message="Reloading NGINX web server..." --weight=1 -ynh_systemd_action --service_name=nginx --action=reload +#REMOVEME? ynh_systemd_action --service_name=nginx --action=reload #================================================= # END OF SCRIPT From 679346ebfb3f496506fe8abf106b64437b7ce83f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 1 Apr 2023 20:02:22 +0200 Subject: [PATCH 10/26] Packaging v2 --- conf/systemd.service | 2 +- manifest.toml | 39 ++++++++++------ scripts/_common.sh | 19 -------- scripts/backup | 32 ------------- scripts/change_url | 98 ++------------------------------------- scripts/install | 108 ++++--------------------------------------- scripts/remove | 40 +--------------- scripts/restore | 66 +++----------------------- scripts/upgrade | 92 ++---------------------------------- tests.toml | 3 ++ 10 files changed, 53 insertions(+), 446 deletions(-) create mode 100644 tests.toml diff --git a/conf/systemd.service b/conf/systemd.service index eef7b01..5abbe16 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,7 +7,7 @@ Type=simple User=__APP__ Group=__APP__ WorkingDirectory=__INSTALL_DIR__/ -ExecStart=__INSTALL_DIR__/Radarr -nobrowser -data=__DATA_PATH__ +ExecStart=__INSTALL_DIR__/Radarr -nobrowser -data=__DATA_DIR__ TimeoutStopSec=20 KillMode=process diff --git a/manifest.toml b/manifest.toml index 2f3613b..135fa1e 100644 --- a/manifest.toml +++ b/manifest.toml @@ -21,7 +21,7 @@ yunohost = ">= 11.2" architectures = ["armhf", "arm64", "amd64", "i386"] multi_instance = true ldap = false -sso = false +sso = not_relevant disk = "50M" # FIXME: replace with an **estimate** minimum disk requirement. e.g. 20M, 400M, 1G, ... ram.build = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... @@ -40,21 +40,23 @@ ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requiremen help.fr = "La connexion est désactivée pour Radarr sur YunoHost, utilisez cette permission pour gérer qui y aura accès." [resources] - [resources.sources.main] - armhf.url = "https://github.com/Radarr/Radarr/releases/download/v4.7.5.7809/Radarr.master.4.7.5.7809.linux-core-arm.tar.gz" - armhf.sha256 = "00972d3d587f214c1b3a446c5db2d9ef0823edba5a311670f81d6038bb11c1be" - arm64.url = "https://github.com/Radarr/Radarr/releases/download/v4.7.5.7809/Radarr.master.4.7.5.7809.linux-core-arm64.tar.gz" - arm64.sha256 = "82cc30caaf5920e6f0adcb3a3c006170de2c685f150d01cba4fdadac09d549c9" - amd64.url = "https://github.com/Radarr/Radarr/releases/download/v4.7.5.7809/Radarr.master.4.7.5.7809.linux-core-x64.tar.gz" - amd64.sha256 = "634f262eafe5a56ab071f7cf7332fe9ed4bb0962e63a0cfd8ab7db84829b2f90" - i386.url = "https://github.com/Radarr/Radarr/releases/download/v4.7.5.7809/Radarr.master.4.7.5.7809.linux-core-x86.tar.gz" - i386.sha256 = "e5ae54b2fdd2e310bdd720ce8b6e0bd9ebe4c9500a4af72c092bf8da052108e1" + [resources.sources.main] + armhf.url = "https://github.com/Radarr/Radarr/releases/download/v4.7.5.7809/Radarr.master.4.7.5.7809.linux-core-arm.tar.gz" + armhf.sha256 = "00972d3d587f214c1b3a446c5db2d9ef0823edba5a311670f81d6038bb11c1be" + arm64.url = "https://github.com/Radarr/Radarr/releases/download/v4.7.5.7809/Radarr.master.4.7.5.7809.linux-core-arm64.tar.gz" + arm64.sha256 = "82cc30caaf5920e6f0adcb3a3c006170de2c685f150d01cba4fdadac09d549c9" + amd64.url = "https://github.com/Radarr/Radarr/releases/download/v4.7.5.7809/Radarr.master.4.7.5.7809.linux-core-x64.tar.gz" + amd64.sha256 = "634f262eafe5a56ab071f7cf7332fe9ed4bb0962e63a0cfd8ab7db84829b2f90" + i386.url = "https://github.com/Radarr/Radarr/releases/download/v4.7.5.7809/Radarr.master.4.7.5.7809.linux-core-x86.tar.gz" + i386.sha256 = "e5ae54b2fdd2e310bdd720ce8b6e0bd9ebe4c9500a4af72c092bf8da052108e1" - autoupdate.strategy = "latest_github_release" - autoupdate.asset.armhf = ".*linux-core-arm.tar.gz" - autoupdate.asset.arm64 = ".*linux-core-arm64.tar.gz" - autoupdate.asset.amd64 = ".*linux-core-x64.tar.gz" - autoupdate.asset.i386 = ".*linux-core-x86.tar.gz" + autoupdate.strategy = "latest_github_release" + autoupdate.asset.armhf = ".*linux-core-arm.tar.gz" + autoupdate.asset.arm64 = ".*linux-core-arm64.tar.gz" + autoupdate.asset.amd64 = ".*linux-core-x64.tar.gz" + autoupdate.asset.i386 = ".*linux-core-x86.tar.gz" + + [resources.ports] [resources.system_user] @@ -62,3 +64,10 @@ ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requiremen [resources.permissions] main.url = "/" + api.url = "/api" + api.allowed = "visitors" + api.show_tile = false + api.protected = true + + [resources.apt] + packages = "curl mediainfo sqlite3" diff --git a/scripts/_common.sh b/scripts/_common.sh index e2912a9..ffca845 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,29 +6,10 @@ version="3.2.2.5080" -# Supported architectures -supported_architectures=("arm" "arm64" "x64") - -# dependencies used by the app -#REMOVEME? pkg_dependencies="curl mediainfo sqlite3" - #================================================= # PERSONAL HELPERS #================================================= -get_architecture() { - architecture=$(dpkg --print-architecture) - if [ $architecture = "amd64" ]; then - architecture="x64" - elif [[ $architecture = arm* ]] && [[ $(getconf LONG_BIT) = 32 ]]; then - architecture="arm" - elif [[ $architecture = arm* ]] && [[ $(getconf LONG_BIT) = 64 ]]; then - architecture="arm64" - elif [[ $(echo ${supported_architectures[@]} | grep -ow "$architecture" | wc -w) = 0 ]]; then - ynh_die --message="Unsupported architecture $architecture" - fi -} - #================================================= # EXPERIMENTAL HELPERS #================================================= diff --git a/scripts/backup b/scripts/backup index f9c07a4..dcd8fd7 100755 --- a/scripts/backup +++ b/scripts/backup @@ -10,38 +10,6 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -#REMOVEME? ynh_clean_setup () { - ### Remove this function if there's nothing to clean before calling the remove script. - true -} -# Exit if an error occurs during the execution of the script -#REMOVEME? ynh_abort_if_errors - -#================================================= -# LOAD SETTINGS -#================================================= -#REMOVEME? ynh_print_info --message="Loading installation settings..." - -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) -#REMOVEME? data_path=$(ynh_app_setting_get --app=$app --key=data_path) -#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) - -#================================================= -# DECLARE DATA AND CONF FILES TO BACKUP -#================================================= -ynh_print_info --message="Declaring files to be backed up..." - -### N.B. : the following 'ynh_backup' calls are only a *declaration* of what needs -### to be backuped and not an actual copy of any file. The actual backup that -### creates and fill the archive with the files happens in the core after this -### script is called. Hence ynh_backups calls takes basically 0 seconds to run. - #================================================= # BACKUP THE APP MAIN DIR #================================================= diff --git a/scripts/change_url b/scripts/change_url index 6793094..f4dd460 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -9,62 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# RETRIEVE ARGUMENTS -#================================================= - -#REMOVEME? old_domain=$YNH_APP_OLD_DOMAIN -#REMOVEME? old_path=$YNH_APP_OLD_PATH - -#REMOVEME? new_domain=$YNH_APP_NEW_DOMAIN -#REMOVEME? new_path=$YNH_APP_NEW_PATH - -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#================================================= -# LOAD SETTINGS -#================================================= -#REMOVEME? ynh_script_progression --message="Loading installation settings..." --weight=1 - -#REMOVEME? # Needed for helper "ynh_add_nginx_config" -#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) -#REMOVEME? data_path=$(ynh_app_setting_get --app=$app --key=data_path) -#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port) -#REMOVEME? api_key=$(ynh_app_setting_get --app=$app --key=api_key) - -#================================================= -# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP -#================================================= -#REMOVEME? ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=3 - -# Backup the current version of the app -#REMOVEME? ynh_backup_before_upgrade -#REMOVEME? ynh_clean_setup () { - # Remove the new domain config file, the remove script won't do it as it doesn't know yet its location. -#REMOVEME? ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" - - # Restore it if the upgrade fails -#REMOVEME? ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -#REMOVEME? ynh_abort_if_errors - -#================================================= -# CHECK WHICH PARTS SHOULD BE CHANGED -#================================================= - -#REMOVEME? change_domain=0 -#REMOVEME? if [ "$old_domain" != "$new_domain" ] -then - #REMOVEME? change_domain=1 -fi - -#REMOVEME? change_path=0 -#REMOVEME? if [ "$old_path" != "$new_path" ] -then - #REMOVEME? change_path=1 -fi - #================================================= # STANDARD MODIFICATIONS #================================================= @@ -81,44 +25,17 @@ ynh_script_progression --message="Updating NGINX web server configuration..." -- ynh_change_url_nginx_config -#REMOVEME? nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf - -# Change the path in the NGINX config file -if [ $change_path -eq 1 ] -then - # Make a backup of the original NGINX config file if modified -#REMOVEME? ynh_backup_if_checksum_is_different --file="$nginx_conf_path" - # Set global variables for NGINX helper -#REMOVEME? domain="$old_domain" -#REMOVEME? path="$new_path" -#REMOVEME? path="$new_path" - # Create a dedicated NGINX config -#REMOVEME? ynh_add_nginx_config -else -#REMOVEME? path="$old_path" -fi - -# Change the domain for NGINX -if [ $change_domain -eq 1 ] -then - # Delete file checksum for the old conf file location -#REMOVEME? ynh_delete_file_checksum --file="$nginx_conf_path" -#REMOVEME? mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf - # Store file checksum for the new config file location -#REMOVEME? ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" -fi - #================================================= # SPECIFIC MODIFICATIONS #================================================= # UPDATE CONFIGURATION FILE #================================================= -ynh_exec_warn_less 'ynh_add_config --template="../conf/config.xml" --destination="$data_path/config.xml"' +ynh_exec_warn_less 'ynh_add_config --template="../conf/config.xml" --destination="$data_dir/config.xml"' -chmod 750 "$data_path/config.xml" -chmod o-rwx "$data_path/config.xml" -chown $app "$data_path/config.xml" +chmod 750 "$data_dir/config.xml" +chmod o-rwx "$data_dir/config.xml" +chown $app "$data_dir/config.xml" #================================================= # GENERIC FINALISATION @@ -129,13 +46,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=2 ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Application started" --timeout=30 -#================================================= -# RELOAD NGINX -#================================================= -#REMOVEME? ynh_script_progression --message="Reloading NGINX web server..." --weight=1 - -#REMOVEME? #REMOVEME? ynh_systemd_action --service_name=nginx --action=reload - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/install b/scripts/install index e219011..54cb182 100755 --- a/scripts/install +++ b/scripts/install @@ -9,89 +9,15 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -#REMOVEME? ynh_clean_setup () { - ### Remove this function if there's nothing to clean before calling the remove script. - true -} -# Exit if an error occurs during the execution of the script -#REMOVEME? ynh_abort_if_errors - -#================================================= -# RETRIEVE ARGUMENTS FROM THE MANIFEST -#================================================= - -#REMOVEME? domain=$YNH_APP_ARG_DOMAIN -#REMOVEME? path=$YNH_APP_ARG_PATH -#REMOVEME? admin=$YNH_APP_ARG_ADMIN - -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#================================================= -# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS -#================================================= -#REMOVEME? ynh_script_progression --message="Validating installation parameters..." --weight=1 - -#REMOVEME? install_dir=/opt/yunohost/$app -#REMOVEME? test ! -e "$install_dir" || ynh_die --message="Installation path ($install_dir) already exists" - -data_path=/home/yunohost.app/$app -test ! -e "$data_path" || ynh_die --message="Data directory ($data_path) already exists" - -# Register (book) web path -#REMOVEME? ynh_webpath_register --app=$app --domain=$domain --path=$path - -#================================================= -# STORE SETTINGS FROM MANIFEST -#================================================= -#REMOVEME? ynh_script_progression --message="Storing installation settings..." --weight=1 - -#REMOVEME? ynh_app_setting_set --app=$app --key=domain --value=$domain -#REMOVEME? ynh_app_setting_set --app=$app --key=path --value=$path -#REMOVEME? ynh_app_setting_set --app=$app --key=admin --value=$admin - -#================================================= -# STANDARD MODIFICATIONS -#================================================= -# FIND AND OPEN A PORT -#================================================= -#REMOVEME? ynh_script_progression --message="Finding an available port..." --weight=1 - -# Find an available port -#REMOVEME? port=$(ynh_find_port --port=8095) -#REMOVEME? ynh_app_setting_set --app=$app --key=port --value=$port - -#================================================= -# INSTALL DEPENDENCIES -#================================================= -#REMOVEME? ynh_script_progression --message="Installing dependencies..." --weight=4 - -#REMOVEME? ynh_install_app_dependencies $pkg_dependencies - -#================================================= -# CREATE DEDICATED USER -#================================================= -#REMOVEME? ynh_script_progression --message="Configuring system user..." --weight=1 - -# Create a system user -#REMOVEME? ynh_system_user_create --username=$app --home_dir="$install_dir" - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= ynh_script_progression --message="Setting up source files..." --weight=3 -get_architecture - -#REMOVEME? ynh_app_setting_set --app=$app --key=install_dir --value=$install_dir # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" -#REMOVEME? ynh_app_setting_set --app=$app --key=data_path --value=$data_path -mkdir -p "$data_path/logs" +mkdir -p "$data_dir/logs" #================================================= # NGINX CONFIGURATION @@ -119,7 +45,7 @@ ynh_script_progression --message="Configuring Radarr..." --weight=2 api_key=$(ynh_string_random --length=32) ynh_app_setting_set --app=$app --key=api_key --value=$api_key -ynh_add_config --template="../conf/config.xml" --destination="$data_path/config.xml" +ynh_add_config --template="../conf/config.xml" --destination="$data_dir/config.xml" #================================================= # SETUP FILE PERMISSIONS @@ -130,12 +56,12 @@ chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" chown -R $app: "$install_dir" -chmod 750 "$data_path" -chmod -R o-rwx "$data_path" -chown -R $app: "$data_path" +chmod 750 "$data_dir" +chmod -R o-rwx "$data_dir" +chown -R $app: "$data_dir" -chmod 400 "$data_path/config.xml" -chown $app:$app "$data_path/config.xml" +chmod 400 "$data_dir/config.xml" +chown $app:$app "$data_dir/config.xml" #================================================= # YUNOHOST MULTIMEDIA INTEGRATION @@ -156,14 +82,14 @@ ynh_script_progression --message="Configuring log rotation..." --weight=1 # Use logrotate to manage application logfile(s) ynh_use_logrotate -ynh_use_logrotate --logfile="$data_path/logs" +ynh_use_logrotate --logfile="$data_dir/logs" #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 -yunohost service add $app --description="Radarr daemon" --log="$data_path/logs/radarr.txt" +yunohost service add $app --description="Radarr daemon" --log="$data_dir/logs/radarr.txt" #================================================= # START SYSTEMD SERVICE @@ -173,22 +99,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=2 # Start a systemd service ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Application started" --timeout=30 -#================================================= -# SETUP SSOWAT -#================================================= -#REMOVEME? ynh_script_progression --message="Configuring permissions..." --weight=1 - -#REMOVEME? ynh_permission_update --permission="main" --add="$admin" --remove="all_users" - -#REMOVEME? ynh_permission_create --permission="api" --url="/api" --allowed="visitors" --show_tile="false" --protected="true" - -#================================================= -# RELOAD NGINX -#================================================= -#REMOVEME? ynh_script_progression --message="Reloading NGINX web server..." --weight=1 - -#REMOVEME? ynh_systemd_action --service_name=nginx --action=reload - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/remove b/scripts/remove index fdffcf9..299ed38 100755 --- a/scripts/remove +++ b/scripts/remove @@ -9,18 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# LOAD SETTINGS -#================================================= -#REMOVEME? ynh_script_progression --message="Loading installation settings..." --weight=1 - -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) -#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port) -#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) -#REMOVEME? data_path=$(ynh_app_setting_get --app=$app --key=data_path) - #================================================= # STANDARD REMOVE #================================================= @@ -42,29 +30,13 @@ ynh_script_progression --message="Stopping and removing the systemd service..." # Remove the dedicated systemd config ynh_remove_systemd_config -#================================================= -# REMOVE DEPENDENCIES -#================================================= -#REMOVEME? ynh_script_progression --message="Removing dependencies..." --weight=3 - -# Remove metapackage and its dependencies -#REMOVEME? ynh_remove_app_dependencies - -#================================================= -# REMOVE APP MAIN DIR -#================================================= -#REMOVEME? ynh_script_progression --message="Removing app main directory..." --weight=1 - -# Remove the app directory securely -#REMOVEME? ynh_secure_remove --file="$install_dir" - #================================================= # REMOVE APP DATA DIR #================================================= ynh_script_progression --message="Removing app data directory..." --weight=1 # Remove the app directory securely -ynh_secure_remove --file="$data_path" +ynh_secure_remove --file="$data_dir" #================================================= # REMOVE NGINX CONFIGURATION @@ -102,16 +74,6 @@ ynh_script_progression --message="Removing various files..." --weight=1 # Remove the log files ynh_secure_remove --file="/var/log/$app" -#================================================= -# GENERIC FINALIZATION -#================================================= -# REMOVE DEDICATED USER -#================================================= -#REMOVEME? ynh_script_progression --message="Removing the dedicated system user..." --weight=1 - -# Delete a system user -#REMOVEME? ynh_system_user_delete --username=$app - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/restore b/scripts/restore index 70e9338..8b5663b 100755 --- a/scripts/restore +++ b/scripts/restore @@ -10,40 +10,6 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -#REMOVEME? ynh_clean_setup () { - #### Remove this function if there's nothing to clean before calling the remove script. - true -} -# Exit if an error occurs during the execution of the script -#REMOVEME? ynh_abort_if_errors - -#================================================= -# LOAD SETTINGS -#================================================= -#REMOVEME? ynh_script_progression --message="Loading installation settings..." --weight=1 - -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) -#REMOVEME? path=$(ynh_app_setting_get --app=$app --key=path) -#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) -#REMOVEME? data_path=$(ynh_app_setting_get --app=$app --key=data_path) - -#================================================= -# CHECK IF THE APP CAN BE RESTORED -#================================================= -#REMOVEME? ynh_script_progression --message="Validating restoration parameters..." --weight=1 - -#REMOVEME? test ! -d $install_dir \ - || ynh_die --message="There is already a directory: $install_dir " - -test ! -d $data_path \ - || ynh_die --message="There is already a directory: $data_path " - #================================================= # STANDARD RESTORATION STEPS #================================================= @@ -53,14 +19,6 @@ ynh_script_progression --message="Restoring the NGINX configuration..." --weight ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# RECREATE THE DEDICATED USER -#================================================= -#REMOVEME? ynh_script_progression --message="Recreating the dedicated system user..." --weight=1 - -# Create the dedicated user (if not existing) -#REMOVEME? ynh_system_user_create --username=$app --home_dir="$install_dir" - #================================================= # RESTORE THE APP MAIN DIR #================================================= @@ -68,7 +26,6 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$install_dir" -chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:$app "$install_dir" @@ -77,14 +34,13 @@ chown -R $app:$app "$install_dir" #================================================= ynh_script_progression --message="Restoring the app data directory..." --weight=2 -ynh_restore_file --origin_path="$data_path" +ynh_restore_file --origin_path="$data_dir" --not_mandatory -chmod 750 "$data_path" -chmod -R o-rwx "$data_path" -chown -R $app: "$data_path" +# (Same as for install dir) +chown -R $app: "$data_dir" -chmod 400 "$data_path/config.xml" -chown $app:$app "$data_path/config.xml" +#chmod 400 "$data_dir/config.xml" +#chown $app:$app "$data_dir/config.xml" #================================================= # YUNOHOST MULTIMEDIA INTEGRATION @@ -96,16 +52,6 @@ ynh_multimedia_build_main_dir # Enable writing into these directories ynh_multimedia_addaccess $app -#================================================= -# SPECIFIC RESTORATION -#================================================= -# REINSTALL DEPENDENCIES -#================================================= -#REMOVEME? ynh_script_progression --message="Reinstalling dependencies..." --weight=4 - -# Define and install dependencies -#REMOVEME? ynh_install_app_dependencies $pkg_dependencies - #================================================= # RESTORE SYSTEMD #================================================= @@ -119,7 +65,7 @@ systemctl enable $app.service --quiet #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 -yunohost service add $app --description="Radarr daemon" --log="$data_path/logs/radarr.txt" +yunohost service add $app --description="Radarr daemon" --log="$data_dir/logs/radarr.txt" #================================================= # START SYSTEMD SERVICE diff --git a/scripts/upgrade b/scripts/upgrade index 40cc521..4d74a79 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,47 +9,12 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# LOAD SETTINGS -#================================================= -#REMOVEME? ynh_script_progression --message="Loading installation settings..." --weight=1 - -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) -#REMOVEME? path=$(ynh_app_setting_get --app=$app --key=path) -#REMOVEME? admin=$(ynh_app_setting_get --app=$app --key=admin) -#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port) -#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) -#REMOVEME? data_path=$(ynh_app_setting_get --app=$app --key=data_path) -#REMOVEME? api_key=$(ynh_app_setting_get --app=$app --key=api_key) - #================================================= # CHECK VERSION #================================================= -### This helper will compare the version of the currently installed app and the version of the upstream package. -### $upgrade_type can have 2 different values -### - UPGRADE_APP if the upstream app version has changed -### - UPGRADE_PACKAGE if only the YunoHost package has changed -### ynh_check_app_version_changed will stop the upgrade if the app is up to date. -### UPGRADE_APP should be used to upgrade the core app only if there's an upgrade to do. upgrade_type=$(ynh_check_app_version_changed) -#================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP -#================================================= -#REMOVEME? ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=4 - -# Backup the current version of the app -#REMOVEME? ynh_backup_before_upgrade -#REMOVEME? ynh_clean_setup () { - # Restore it if the upgrade fails -#REMOVEME? ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -#REMOVEME? ynh_abort_if_errors - #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -59,31 +24,6 @@ ynh_script_progression --message="Stopping a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" -#================================================= -# ENSURE DOWNWARD COMPATIBILITY -#================================================= -ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 - -# Create a permission if needed -#REMOVEME? if ! ynh_permission_exists --permission="api"; then -#REMOVEME? ynh_permission_create --permission="api" --url="/api" --allowed="visitors" --show_tile="false" --protected="true" -fi - -# Move data directory if needed -if [ -z "$data_path" ]; then - data_path=/home/yunohost.app/$app -#REMOVEME? ynh_app_setting_set --app=$app --key=data_path --value=$data_path - mv "$install_dir/.data" "/home/yunohost.app/$app" -fi - -#================================================= -# CREATE DEDICATED USER -#================================================= -#REMOVEME? ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 - -# Create a dedicated user (if not existing) -#REMOVEME? ynh_system_user_create --username=$app --home_dir="$install_dir" - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -92,21 +32,13 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=3 - get_architecture - # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" fi -chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" chown -R $app: "$install_dir" -mkdir -p "$data_path/logs" -chmod 750 "$data_path" -chmod -R o-rwx "$data_path" -chown -R $app: "$data_path" - #================================================= # NGINX CONFIGURATION #================================================= @@ -115,13 +47,6 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# UPGRADE DEPENDENCIES -#================================================= -#REMOVEME? ynh_script_progression --message="Upgrading dependencies..." --weight=4 - -#REMOVEME? ynh_install_app_dependencies $pkg_dependencies - #================================================= # SPECIFIC UPGRADE #================================================= @@ -137,10 +62,10 @@ ynh_add_systemd_config #================================================= ynh_script_progression --message="Updating the configuration file.." --weight=1 -ynh_add_config --template="../conf/config.xml" --destination="$data_path/config.xml" +ynh_add_config --template="../conf/config.xml" --destination="$data_dir/config.xml" -chmod 400 "$data_path/config.xml" -chown $app:$app "$data_path/config.xml" +chmod 400 "$data_dir/config.xml" +chown $app:$app "$data_dir/config.xml" #================================================= # GENERIC FINALIZATION @@ -151,14 +76,14 @@ ynh_script_progression --message="Upgrading logrotate configuration..." --weight # Use logrotate to manage app-specific logfile(s) ynh_use_logrotate --non-append -ynh_use_logrotate --non-append --logfile="$data_path/logs" +ynh_use_logrotate --non-append --logfile="$data_dir/logs" #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 -yunohost service add $app --description="Radarr daemon" --log="$data_path/logs/radarr.txt" +yunohost service add $app --description="Radarr daemon" --log="$data_dir/logs/radarr.txt" #================================================= # START SYSTEMD SERVICE @@ -167,13 +92,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=2 ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Application started" --timeout=30 -#================================================= -# RELOAD NGINX -#================================================= -#REMOVEME? ynh_script_progression --message="Reloading NGINX web server..." --weight=1 - -#REMOVEME? ynh_systemd_action --service_name=nginx --action=reload - #================================================= # END OF SCRIPT #================================================= diff --git a/tests.toml b/tests.toml new file mode 100644 index 0000000..cbbeef1 --- /dev/null +++ b/tests.toml @@ -0,0 +1,3 @@ +test_format = 1.0 + +[default] From 63d089c9fad79e40422bcd6ed65fed4eb17b71bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 1 Apr 2023 20:04:07 +0200 Subject: [PATCH 11/26] v2 --- check_process | 35 ----------------------------------- tests.toml | 7 +++++++ 2 files changed, 7 insertions(+), 35 deletions(-) delete mode 100644 check_process diff --git a/check_process b/check_process deleted file mode 100644 index 40e68ea..0000000 --- a/check_process +++ /dev/null @@ -1,35 +0,0 @@ -# See here for more information -# https://github.com/YunoHost/package_check#syntax-check_process-file - -# Move this file from check_process.default to check_process when you have filled it. - -;; Test complet - ; Manifest - domain="domain.tld" - path="/path" - admin="john" - ; Checks - pkg_linter=1 - setup_sub_dir=1 - setup_root=1 - setup_nourl=0 - setup_private=1 - setup_public=1 - upgrade=1 - #upgrade=1 from_commit=CommitHash - upgrade=1 from_commit=164fa2341225bc8ce7671d0f70cc696ed8ab58a7 - upgrade=1 from_commit=35c7ebe40c8893321c39570608ac0deacc9407c0 - backup_restore=1 - multi_instance=1 - port_already_use=0 - change_url=1 -;;; Options -Email= -Notification=none -;;; Upgrade options - ; commit=164fa2341225bc8ce7671d0f70cc696ed8ab58a7 - name=2021-06-03 v3.2.0.5048 - manifest_arg=domain=DOMAIN&path=PATH&admin=USER& - ; commit=35c7ebe40c8893321c39570608ac0deacc9407c0 - name=2021-06-13 3.2.2.5080~ynh1 - manifest_arg=domain=DOMAIN&path=PATH&admin=USER& diff --git a/tests.toml b/tests.toml index cbbeef1..acb2b6b 100644 --- a/tests.toml +++ b/tests.toml @@ -1,3 +1,10 @@ test_format = 1.0 [default] + + + # ------------------------------- + # Commits to test upgrade from + # ------------------------------- + + test_upgrade_from.35c7ebe4.name = "Upgrade from 3.2.2.5080~ynh1" From 31b8c991c3293133e8f775cd59c8ead9804562ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 1 Apr 2023 20:13:02 +0200 Subject: [PATCH 12/26] fix --- doc/{DISCLAIMER.md => ADMIN.md} | 1 - doc/{DISCLAIMER_fr.md => ADMIN_fr.md} | 1 - manifest.toml | 2 ++ 3 files changed, 2 insertions(+), 2 deletions(-) rename doc/{DISCLAIMER.md => ADMIN.md} (86%) rename doc/{DISCLAIMER_fr.md => ADMIN_fr.md} (87%) diff --git a/doc/DISCLAIMER.md b/doc/ADMIN.md similarity index 86% rename from doc/DISCLAIMER.md rename to doc/ADMIN.md index 057af7d..d14f5c3 100644 --- a/doc/DISCLAIMER.md +++ b/doc/ADMIN.md @@ -1,4 +1,3 @@ -* Supported architectures are `arm`, `arm64`, and `amd64` * Access control is done with YunoHost's permissions system. * API (`domain.tld/path/api`) can be accessed by visitors to allow control by remote clients. * The app uses YunoHost's multimedia directories, hence it has write access to users' and shared directories in `/home/yunohost.multimedia`. After installation, you can choose these directories to store your media. diff --git a/doc/DISCLAIMER_fr.md b/doc/ADMIN_fr.md similarity index 87% rename from doc/DISCLAIMER_fr.md rename to doc/ADMIN_fr.md index aeb69c3..8b0f62b 100644 --- a/doc/DISCLAIMER_fr.md +++ b/doc/ADMIN_fr.md @@ -1,4 +1,3 @@ -* Les architectures compatibles sont `arm`, `arm64`, et `amd64` * Le contrôle de l'accès se fait avec le système de permissions de YunoHost. * L'API (`domain.tld/path/api`) est accessible aux visiteurs pour permettre le contrôle via des clients externes. * L'application utilise les dossiers multimédia de YunoHost, elle a donc accès en écriture aux dossiers utilisateurs et communs de `/home/yunohost.multimedia`. Après installation, vous pourrez choisir ces dossiers pour y stocker vos médias. diff --git a/manifest.toml b/manifest.toml index 135fa1e..b67d508 100644 --- a/manifest.toml +++ b/manifest.toml @@ -62,6 +62,8 @@ ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requiremen [resources.install_dir] + [resources.data_dir] + [resources.permissions] main.url = "/" api.url = "/api" From fc0af704e4e5a08a2b85b3a88eb71974a259d6f9 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 1 Apr 2023 18:13:07 +0000 Subject: [PATCH 13/26] Auto-update README --- README.md | 7 ------- README_fr.md | 7 ------- 2 files changed, 14 deletions(-) diff --git a/README.md b/README.md index b1a0983..035e494 100644 --- a/README.md +++ b/README.md @@ -24,13 +24,6 @@ Movie collection manager for Usenet and BitTorrent users ![Screenshot of Radarr](./doc/screenshots/screenshot.jpg) -## Disclaimers / important information - -* Supported architectures are `arm`, `arm64`, and `amd64` -* Access control is done with YunoHost's permissions system. - * API (`domain.tld/path/api`) can be accessed by visitors to allow control by remote clients. -* The app uses YunoHost's multimedia directories, hence it has write access to users' and shared directories in `/home/yunohost.multimedia`. After installation, you can choose these directories to store your media. - ## Documentation and resources * Official app website: diff --git a/README_fr.md b/README_fr.md index 5181828..ea5835c 100644 --- a/README_fr.md +++ b/README_fr.md @@ -24,13 +24,6 @@ Gestionnaire de filmothèque pour utilisateurs de Usenet et BitTorrent ![Capture d’écran de Radarr](./doc/screenshots/screenshot.jpg) -## Avertissements / informations importantes - -* Les architectures compatibles sont `arm`, `arm64`, et `amd64` -* Le contrôle de l'accès se fait avec le système de permissions de YunoHost. - * L'API (`domain.tld/path/api`) est accessible aux visiteurs pour permettre le contrôle via des clients externes. -* L'application utilise les dossiers multimédia de YunoHost, elle a donc accès en écriture aux dossiers utilisateurs et communs de `/home/yunohost.multimedia`. Après installation, vous pourrez choisir ces dossiers pour y stocker vos médias. - ## Documentations et ressources * Site officiel de l’app : From 14a1b2f0d7818ccc0316cf97dea956ff7dd54782 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 1 Apr 2023 21:00:01 +0200 Subject: [PATCH 14/26] Create DESCRIPTION.md --- doc/DESCRIPTION.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/DESCRIPTION.md diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md new file mode 100644 index 0000000..37215be --- /dev/null +++ b/doc/DESCRIPTION.md @@ -0,0 +1 @@ +Movie collection manager for Usenet and BitTorrent users \ No newline at end of file From da78d18a27c5ff7e28dbec7ec4d8b4793d0e1397 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 1 Apr 2023 19:00:08 +0000 Subject: [PATCH 15/26] Auto-update README --- README_fr.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_fr.md b/README_fr.md index ea5835c..badcd59 100644 --- a/README_fr.md +++ b/README_fr.md @@ -16,7 +16,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po ## Vue d’ensemble -Gestionnaire de filmothèque pour utilisateurs de Usenet et BitTorrent +Movie collection manager for Usenet and BitTorrent users **Version incluse :** 4.7.5.7809~ynh1 From 17c9629b2d78c513b10297ec97c9eb833c0b456b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 1 Apr 2023 21:50:19 +0200 Subject: [PATCH 16/26] Update backup --- scripts/backup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/backup b/scripts/backup index dcd8fd7..81559e2 100755 --- a/scripts/backup +++ b/scripts/backup @@ -20,7 +20,7 @@ ynh_backup --src_path="$install_dir" # BACKUP THE APP DATA DIR #================================================= -ynh_backup --src_path="$data_path" +ynh_backup --src_path="$data_dir" #================================================= # BACKUP THE NGINX CONFIGURATION From bcc3ef96aee6440f06e04aa644e6699b26e30ff6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 1 Apr 2023 21:51:35 +0200 Subject: [PATCH 17/26] fix --- scripts/remove | 10 ---------- scripts/upgrade | 10 ---------- 2 files changed, 20 deletions(-) diff --git a/scripts/remove b/scripts/remove index 299ed38..272e743 100755 --- a/scripts/remove +++ b/scripts/remove @@ -54,16 +54,6 @@ ynh_script_progression --message="Removing logrotate configuration..." --weight= # Remove the app-specific logrotate config ynh_remove_logrotate -#================================================= -# CLOSE A PORT -#================================================= - -if yunohost firewall list | grep -q "\- $port$" -then - ynh_script_progression --message="Closing port $port..." --weight=1 - ynh_exec_warn_less yunohost firewall disallow TCP $port -fi - #================================================= # SPECIFIC REMOVE #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 4d74a79..4d45fbd 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -57,16 +57,6 @@ ynh_script_progression --message="Upgrading systemd configuration..." --weight=1 # Create a dedicated systemd config ynh_add_systemd_config -#================================================= -# UPDATE A CONFIG FILE -#================================================= -ynh_script_progression --message="Updating the configuration file.." --weight=1 - -ynh_add_config --template="../conf/config.xml" --destination="$data_dir/config.xml" - -chmod 400 "$data_dir/config.xml" -chown $app:$app "$data_dir/config.xml" - #================================================= # GENERIC FINALIZATION #================================================= From c730053e18284d1f291f46b816f250ddd156cd61 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 11 Sep 2023 19:25:57 +0200 Subject: [PATCH 18/26] Fix manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index b67d508..de2e165 100644 --- a/manifest.toml +++ b/manifest.toml @@ -21,7 +21,7 @@ yunohost = ">= 11.2" architectures = ["armhf", "arm64", "amd64", "i386"] multi_instance = true ldap = false -sso = not_relevant +sso = "not_relevant" disk = "50M" # FIXME: replace with an **estimate** minimum disk requirement. e.g. 20M, 400M, 1G, ... ram.build = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... From 010c9c176795af0b8fd25da8bbffefa6846133a3 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 11 Sep 2023 17:26:34 +0000 Subject: [PATCH 19/26] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 035e494..5411c9e 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Movie collection manager for Usenet and BitTorrent users -**Shipped version:** 4.7.5.7809~ynh1 +**Shipped version:** 4.3.2.6857~ynh1 ## Screenshots diff --git a/README_fr.md b/README_fr.md index badcd59..a028057 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Movie collection manager for Usenet and BitTorrent users -**Version incluse :** 4.7.5.7809~ynh1 +**Version incluse :** 4.3.2.6857~ynh1 ## Captures d’écran From b23ef8e27bf15dd1f69c474f9fddd1fdfba52a1b Mon Sep 17 00:00:00 2001 From: tituspijean Date: Tue, 12 Sep 2023 18:25:18 +0200 Subject: [PATCH 20/26] Fix tests.toml --- tests.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/tests.toml b/tests.toml index acb2b6b..1ac4a21 100644 --- a/tests.toml +++ b/tests.toml @@ -8,3 +8,4 @@ test_format = 1.0 # ------------------------------- test_upgrade_from.35c7ebe4.name = "Upgrade from 3.2.2.5080~ynh1" + test_upgrade_from.35c7ebe4.args.admin = "package_checker" From f2bab8a58fe2a7a5be265c141046b81cf8b79f2e Mon Sep 17 00:00:00 2001 From: tituspijean Date: Tue, 12 Sep 2023 18:37:42 +0200 Subject: [PATCH 21/26] Fix config.xml --- conf/config.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/config.xml b/conf/config.xml index ae3f2f2..bc3e375 100644 --- a/conf/config.xml +++ b/conf/config.xml @@ -6,8 +6,8 @@ __PORT__ __PATH__ __API_KEY__ - Forms - BuiltIn + External + External develop __PORT__ False From 420b61f2620cb379b36d05aa55a3d65492247f72 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Wed, 13 Sep 2023 00:05:45 +0200 Subject: [PATCH 22/26] Fix tests.toml --- tests.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests.toml b/tests.toml index 1ac4a21..8b3b8f8 100644 --- a/tests.toml +++ b/tests.toml @@ -8,4 +8,6 @@ test_format = 1.0 # ------------------------------- test_upgrade_from.35c7ebe4.name = "Upgrade from 3.2.2.5080~ynh1" + test_upgrade_from.35c7ebe4.args.domain = "sub.domain.tld" + test_upgrade_from.35c7ebe4.args.path = "/radarr" test_upgrade_from.35c7ebe4.args.admin = "package_checker" From 2429af98f8c805aace42702ba5d0f7bdab5cb118 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Wed, 13 Sep 2023 00:13:00 +0200 Subject: [PATCH 23/26] Make sure configuration is correct, again --- conf/config.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/conf/config.xml b/conf/config.xml index bc3e375..6e40833 100644 --- a/conf/config.xml +++ b/conf/config.xml @@ -6,7 +6,7 @@ __PORT__ __PATH__ __API_KEY__ - External + None External develop __PORT__ @@ -14,5 +14,4 @@ False Radarr - DisabledForLocalAddresses From df8b8b4f6b26a007ae2700e15491b2d6845d3e9f Mon Sep 17 00:00:00 2001 From: tituspijean Date: Wed, 13 Sep 2023 00:33:44 +0200 Subject: [PATCH 24/26] Update disk and RAM usage --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index de2e165..55946c6 100644 --- a/manifest.toml +++ b/manifest.toml @@ -22,9 +22,9 @@ architectures = ["armhf", "arm64", "amd64", "i386"] multi_instance = true ldap = false sso = "not_relevant" -disk = "50M" # FIXME: replace with an **estimate** minimum disk requirement. e.g. 20M, 400M, 1G, ... -ram.build = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... -ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... +disk = "300M" +ram.build = "100M" +ram.runtime = "100M" [install] [install.domain] From 5655723a12443d297277d2c7bdf1862c09316b82 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Wed, 13 Sep 2023 00:47:28 +0200 Subject: [PATCH 25/26] External update is actually not supported --- conf/config.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/config.xml b/conf/config.xml index 6e40833..bc40bfb 100644 --- a/conf/config.xml +++ b/conf/config.xml @@ -7,7 +7,7 @@ __PATH__ __API_KEY__ None - External + BuiltIn develop __PORT__ False From aec5621dc28c4b793892a3cb267016347e22fb85 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Wed, 13 Sep 2023 00:51:42 +0200 Subject: [PATCH 26/26] Add sleep after upgrade --- scripts/upgrade | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 4d45fbd..fc3a3ec 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -81,6 +81,8 @@ yunohost service add $app --description="Radarr daemon" --log="$data_dir/logs/ra ynh_script_progression --message="Starting a systemd service..." --weight=2 ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Application started" --timeout=30 +# We might need to wait a bit further for migrations to finish +sleep 5 #================================================= # END OF SCRIPT