diff --git a/README.md b/README.md index 08b6a3c..c506448 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Transmission is a fast, easy, and free BitTorrent client. ## Documentation * Official documentation: https://github.com/transmission/transmission/wiki - * YunoHost documentation: https://yunohost.org/#/app_transmission + * YunoHost documentation: https://yunohost.org/en/app_transmission ## YunoHost specific features @@ -32,8 +32,8 @@ Transmission is a fast, easy, and free BitTorrent client. #### Supported architectures -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/transmission%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/transmission/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/transmission%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/transmission/) +* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/transmission.svg)](https://ci-apps.yunohost.org/ci/apps/transmission/) +* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/transmission.svg)](https://ci-apps-arm.yunohost.org/ci/apps/transmission/) ## Limitations diff --git a/README_fr.md b/README_fr.md index d3ce919..a1366da 100644 --- a/README_fr.md +++ b/README_fr.md @@ -22,7 +22,7 @@ Transmission est un client BitTorrent libre, efficace et simple. ## Documentation * Documentation officielle : https://github.com/transmission/transmission/wiki - * Documentation YunoHost : https://yunohost.org/#/app_transmission + * Documentation YunoHost : https://yunohost.org/fr/app_transmission ## Caractéristiques spécifiques YunoHost @@ -32,8 +32,8 @@ Transmission est un client BitTorrent libre, efficace et simple. #### Architectures supportées -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/transmission%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/transmission/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/transmission%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/transmission/) +* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/transmission.svg)](https://ci-apps.yunohost.org/ci/apps/transmission/) +* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/transmission.svg)](https://ci-apps-arm.yunohost.org/ci/apps/transmission/) ## Limitations diff --git a/check_process b/check_process index d989292..4aacb88 100644 --- a/check_process +++ b/check_process @@ -14,7 +14,6 @@ upgrade=1 from_commit=7d887f6bc1e29ce94de703517d5302580cbb8a7e backup_restore=1 multi_instance=0 - port_already_use=1 (9091) change_url=1 ;;; Options Email= diff --git a/manifest.json b/manifest.json index dfedb3e..f12d575 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "A Fast, Easy, and Free BitTorrent Client", "fr": "Un client BitTorrent libre et rapide" }, - "version": "1.0~ynh3", + "version": "1.0~ynh4", "url": "https://www.transmissionbt.com/", "license": "GPL-3.0", "maintainer": { @@ -14,7 +14,7 @@ "email": "" }, "requirements": { - "yunohost": ">= 3.8.1" + "yunohost": ">= 4.1.7" }, "multi_instance": false, "services": [ @@ -26,19 +26,11 @@ { "name": "domain", "type": "domain", - "ask": { - "en": "Choose a domain name for Transmission", - "fr": "Choisissez un nom de domaine pour Transmission" - }, "example": "domain.org" }, { "name": "path", "type": "path", - "ask": { - "en": "Choose a path for Transmission", - "fr": "Choisissez un chemin pour Transmission" - }, "example": "/transmission", "default": "/transmission" } diff --git a/pull_request_template.md b/pull_request_template.md index 69a2d22..0a198cf 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -11,14 +11,6 @@ - [ ] Upgrade from last version tested. - [ ] Can be reviewed and tested. -## Validation +## Package_check results --- -*Minor decision* -- **Upgrade previous version** : -- [ ] **Code review** : -- [ ] **Approval (LGTM)** : -- [ ] **Approval (LGTM)** : -- **CI succeeded** : -[![Build Status](https://ci-apps-hq.yunohost.org/jenkins/job/transmission_ynh%20PR-NUM-/badge/icon)](https://ci-apps-hq.yunohost.org/jenkins/job/transmission_ynh%20PR-NUM-/) -*Please replace '-NUM-' in this link by the PR number.* -When the PR is marked as ready to merge, you have to wait for 3 days before really merging it. +* An automatic package_check will be launch at https://ci-apps-dev.yunohost.org/, when you add a specific comment to your Pull Request: "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!"* diff --git a/scripts/change_url b/scripts/change_url index 4067ead..2f8ffec 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -30,6 +30,23 @@ ynh_script_progression --message="Loading installation settings..." final_path=$(ynh_app_setting_get --app=$app --key=final_path) port=$(ynh_app_setting_get --app=$app --key=port) +#================================================= +# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP +#================================================= +ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=1 + +# Backup the current version of the app +ynh_backup_before_upgrade +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" + + # Restore it if the upgrade fails + ynh_restore_upgradebackup +} +# Exit if an error occurs during the execution of the script +ynh_abort_if_errors + #================================================= # CHECK WHICH PARTS SHOULD BE CHANGED #================================================= diff --git a/scripts/install b/scripts/install index a126fc6..3f80c43 100644 --- a/scripts/install +++ b/scripts/install @@ -46,7 +46,7 @@ ynh_app_setting_set --app=$app --key=path --value=$path_url #================================================= # FIND AND OPEN PORTS #================================================= -ynh_script_progression --message="Configuring firewall..." --weight=16 +ynh_script_progression --message="Finding an available port..." --weight=16 # Find a free port port=$(ynh_find_port --port=9091) @@ -75,7 +75,7 @@ ynh_install_app_dependencies $pkg_dependencies # Explicitly reinstalling the packages fixes the issue :| if [ ! -d /usr/share/transmission/ ] then - ynh_package_install $pkg_dependencies --reinstall + ynh_install_app_dependencies $pkg_dependencies --reinstall fi #================================================= @@ -176,7 +176,7 @@ ynh_systemd_action --service_name=transmission-daemon --action=start # ADVERTISE SERVICE IN ADMIN PANEL #================================================= -yunohost service add transmission-daemon --description="BitTorrent Client" --log="/var/log/syslog" +yunohost service add transmission-daemon --description="BitTorrent Client" --log="/var/log/syslog" --needs_exposed_ports="$peer_port" #================================================= # RELOAD NGINX diff --git a/scripts/restore b/scripts/restore index 83a0d67..17dad2b 100644 --- a/scripts/restore +++ b/scripts/restore @@ -127,7 +127,7 @@ ynh_systemd_action --service_name=transmission-daemon --action=start # ADVERTISE SERVICE IN ADMIN PANEL #================================================= -yunohost service add transmission-daemon --description="BitTorrent Client" --log="/var/log/syslog" +yunohost service add transmission-daemon --description="BitTorrent Client" --log="/var/log/syslog" --needs_exposed_ports="$peer_port" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index e21ecf1..6df4f46 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -175,7 +175,7 @@ ynh_replace_string "