1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/transmission_ynh.git synced 2024-09-04 01:46:12 +02:00

Fix linter warnings (#84)

* Fix linter warnings

* Update install
This commit is contained in:
Éric Gaspar 2021-03-22 13:32:37 +01:00 committed by GitHub
parent 02374d1289
commit 172493ec86
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 27 additions and 27 deletions

View file

@ -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

View file

@ -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

View file

@ -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=

View file

@ -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"
}

View file

@ -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!"*

View file

@ -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
#=================================================

View file

@ -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

View file

@ -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

View file

@ -175,7 +175,7 @@ ynh_replace_string "<div id=\"toolbar-inspector\" title=\"Toggle Inspector\"></d
# 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"
#=================================================
# START TRANSMISSION