mirror of
https://github.com/YunoHost-Apps/transmission_ynh.git
synced 2024-09-04 01:46:12 +02:00
parent
02374d1289
commit
172493ec86
9 changed files with 27 additions and 27 deletions
|
@ -22,7 +22,7 @@ Transmission is a fast, easy, and free BitTorrent client.
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
* Official documentation: https://github.com/transmission/transmission/wiki
|
* 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
|
## YunoHost specific features
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ Transmission est un client BitTorrent libre, efficace et simple.
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
* Documentation officielle : https://github.com/transmission/transmission/wiki
|
* 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
|
## Caractéristiques spécifiques YunoHost
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
upgrade=1 from_commit=7d887f6bc1e29ce94de703517d5302580cbb8a7e
|
upgrade=1 from_commit=7d887f6bc1e29ce94de703517d5302580cbb8a7e
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=0
|
multi_instance=0
|
||||||
port_already_use=1 (9091)
|
|
||||||
change_url=1
|
change_url=1
|
||||||
;;; Options
|
;;; Options
|
||||||
Email=
|
Email=
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
"email": ""
|
"email": ""
|
||||||
},
|
},
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 3.8.1"
|
"yunohost": ">= 4.1.7"
|
||||||
},
|
},
|
||||||
"multi_instance": false,
|
"multi_instance": false,
|
||||||
"services": [
|
"services": [
|
||||||
|
@ -26,19 +26,11 @@
|
||||||
{
|
{
|
||||||
"name": "domain",
|
"name": "domain",
|
||||||
"type": "domain",
|
"type": "domain",
|
||||||
"ask": {
|
|
||||||
"en": "Choose a domain name for Transmission",
|
|
||||||
"fr": "Choisissez un nom de domaine pour Transmission"
|
|
||||||
},
|
|
||||||
"example": "domain.org"
|
"example": "domain.org"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "path",
|
"name": "path",
|
||||||
"type": "path",
|
"type": "path",
|
||||||
"ask": {
|
|
||||||
"en": "Choose a path for Transmission",
|
|
||||||
"fr": "Choisissez un chemin pour Transmission"
|
|
||||||
},
|
|
||||||
"example": "/transmission",
|
"example": "/transmission",
|
||||||
"default": "/transmission"
|
"default": "/transmission"
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,14 +11,6 @@
|
||||||
- [ ] Upgrade from last version tested.
|
- [ ] Upgrade from last version tested.
|
||||||
- [ ] Can be reviewed and tested.
|
- [ ] Can be reviewed and tested.
|
||||||
|
|
||||||
## Validation
|
## Package_check results
|
||||||
---
|
---
|
||||||
*Minor decision*
|
* 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!"*
|
||||||
- **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.
|
|
||||||
|
|
|
@ -30,6 +30,23 @@ ynh_script_progression --message="Loading installation settings..."
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
port=$(ynh_app_setting_get --app=$app --key=port)
|
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
|
# CHECK WHICH PARTS SHOULD BE CHANGED
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -46,7 +46,7 @@ ynh_app_setting_set --app=$app --key=path --value=$path_url
|
||||||
#=================================================
|
#=================================================
|
||||||
# FIND AND OPEN PORTS
|
# 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
|
# Find a free port
|
||||||
port=$(ynh_find_port --port=9091)
|
port=$(ynh_find_port --port=9091)
|
||||||
|
@ -75,7 +75,7 @@ ynh_install_app_dependencies $pkg_dependencies
|
||||||
# Explicitly reinstalling the packages fixes the issue :|
|
# Explicitly reinstalling the packages fixes the issue :|
|
||||||
if [ ! -d /usr/share/transmission/ ]
|
if [ ! -d /usr/share/transmission/ ]
|
||||||
then
|
then
|
||||||
ynh_package_install $pkg_dependencies --reinstall
|
ynh_install_app_dependencies $pkg_dependencies --reinstall
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -176,7 +176,7 @@ ynh_systemd_action --service_name=transmission-daemon --action=start
|
||||||
# ADVERTISE SERVICE IN ADMIN PANEL
|
# 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
|
# RELOAD NGINX
|
||||||
|
|
|
@ -127,7 +127,7 @@ ynh_systemd_action --service_name=transmission-daemon --action=start
|
||||||
# ADVERTISE SERVICE IN ADMIN PANEL
|
# 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
|
# GENERIC FINALIZATION
|
||||||
|
|
|
@ -175,7 +175,7 @@ ynh_replace_string "<div id=\"toolbar-inspector\" title=\"Toggle Inspector\"></d
|
||||||
# ADVERTISE SERVICE IN ADMIN PANEL
|
# 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
|
# START TRANSMISSION
|
||||||
|
|
Loading…
Reference in a new issue