diff --git a/README.md b/README.md index 43c6a8b..08b6a3c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ # Transmission for YunoHost [![Integration level](https://dash.yunohost.org/integration/transmission.svg)](https://dash.yunohost.org/appci/app/transmission) ![](https://ci-apps.yunohost.org/ci/badges/transmission.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/transmission.maintain.svg) -[![Install Transmission with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=transmission) +[![Install Transmission with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=transmission) + +*[Lire ce readme en français.](./README_fr.md)* > *This package allow you to install Transmission quickly and simply on a YunoHost server. If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.* @@ -10,15 +12,10 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to Transmission is a fast, easy, and free BitTorrent client. -**Shipped version:** Debian repository version. +**Shipped version:** 2.94-2 (Debian repository version) ## Screenshots - -![](https://transmissionbt.com/images/screenshots/Clutch-Large.jpg) - -## Demo - -* [YunoHost demo](https://demo.yunohost.org/nextcloud/) +![](transmission.jpg) ## Configuration diff --git a/README_fr.md b/README_fr.md new file mode 100644 index 0000000..d3ce919 --- /dev/null +++ b/README_fr.md @@ -0,0 +1,75 @@ +# Transmission pour YunoHost + +[![Niveau d'intégration](https://dash.yunohost.org/integration/transmission.svg)](https://dash.yunohost.org/appci/app/transmission) ![](https://ci-apps.yunohost.org/ci/badges/transmission.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/transmission.maintain.svg) +[![Installer Transmission avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=transmission) + +*[Read this readme in english.](./README.md)* + +> *Ce package vous permet d'installer Transmission rapidement et simplement sur un serveur YunoHost. +Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install) pour apprendre comment l'installer.* + +## Vue d'ensemble + +Transmission est un client BitTorrent libre, efficace et simple. + +**Version incluse :** 2.94-2 (La version du dépôt de Debian) + +## Captures d'écran +![](transmission.jpg) + +## Configuration + +## Documentation + + * Documentation officielle : https://github.com/transmission/transmission/wiki + * Documentation YunoHost : https://yunohost.org/#/app_transmission + +## Caractéristiques spécifiques YunoHost + + * Intégration avec les répertoires Multimédias de YunoHost + +#### Support multi-utilisateur + +#### 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/) + +## Limitations + +## Informations additionnelles +Alternative à WebUI : + +Vous pouvez utiliser le client de contrôle à distance des différentes plateformes pour gérer votre serveur Transmission : + +* Bureau : Transmission-remote-GUI : https://github.com/transmission-remote-gui/transgui +* Mobile : Transdroid : http://www.transdroid.org/ +* Plus de clients ici : https://transmissionbt.com/resources/ + +Vous pouvez utiliser les informations suivantes pour vous connecter à votre serveur : + +* Hôte distant : Votre domaine ou adresse IP (n'ajoutez pas le répertoire) +* Port : 443 +* SSL : Activé +* Utilisateur : Votre nom d'utilisateur YunoHost +* Mot de passe : Le mot de passe de l'utilisateur YunoHost utilisé +* Répertoire RPC : `/torrent/transmission/rpc` (si vous utilisez le répertoire par défaut) + +## Liens + * Signaler un bug : https://github.com/YunoHost-Apps/transmission_ynh/issues + * Site de Transmission : https://transmissionbt.com/ + * Dépôt de Transmission : https://github.com/transmission/transmission + * Site de YunoHost : https://yunohost.org/ + +--- + +## Informations pour les développeurs + +Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/transmission_ynh/tree/testing). + +Pour essayer la branche testing, procédez comme suit. +``` +sudo yunohost app install https://github.com/YunoHost-Apps/transmission_ynh/tree/testing --debug +ou +sudo yunohost app upgrade transmission -u https://github.com/YunoHost-Apps/transmission_ynh/tree/testing --debug +``` diff --git a/check_process b/check_process index 43bd8d4..d989292 100644 --- a/check_process +++ b/check_process @@ -14,11 +14,8 @@ upgrade=1 from_commit=7d887f6bc1e29ce94de703517d5302580cbb8a7e backup_restore=1 multi_instance=0 - incorrect_path=1 port_already_use=1 (9091) change_url=1 -;;; Levels - Level 5=auto ;;; Options Email= Notification=down diff --git a/manifest.json b/manifest.json index 1686100..7dfae68 100644 --- a/manifest.json +++ b/manifest.json @@ -14,7 +14,7 @@ "email": "apps@yunohost.org" }, "requirements": { - "yunohost": ">= 3.5" + "yunohost": ">= 3.8.1" }, "multi_instance": false, "services": [ @@ -27,7 +27,8 @@ "name": "domain", "type": "domain", "ask": { - "en": "Choose a domain for Transmission" + "en": "Choose a domain name for Transmission", + "fr": "Choisissez un nom de domaine pour Transmission" }, "example": "domain.org" }, @@ -35,10 +36,11 @@ "name": "path", "type": "path", "ask": { - "en": "Choose a path for Transmission" + "en": "Choose a path for Transmission", + "fr": "Choisissez un chemin pour Transmission" }, - "example": "/torrent", - "default": "/torrent" + "example": "/transmission", + "default": "/transmission" } ] } diff --git a/scripts/_common.sh b/scripts/_common.sh index 75b2cbf..e3b88df 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -27,7 +27,7 @@ ynh_multimedia_build_main_dir () { local checksum="806a827ba1902d6911095602a9221181" # Download yunohost.multimedia scripts - wget -nv https://github.com/YunoHost-Apps/yunohost.multimedia/archive/${ynh_media_release}.tar.gz + wget -nv https://github.com/YunoHost-Apps/yunohost.multimedia/archive/${ynh_media_release}.tar.gz 2>&1 # Check the control sum echo "${checksum} ${ynh_media_release}.tar.gz" | md5sum -c --status \ diff --git a/scripts/backup b/scripts/backup index 8a89d8b..775a812 100644 --- a/scripts/backup +++ b/scripts/backup @@ -19,18 +19,20 @@ ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." +ynh_print_info --message="Loading installation settings..." app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) #================================================= -# STANDARD BACKUP STEPS +# DECLARE DATA AND CONF FILES TO BACKUP +#================================================= +ynh_print_info --message="Declaring files to be backed up..." + #================================================= # BACKUP OF THE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Backing up nginx web server configuration..." ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" @@ -39,7 +41,6 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # BACKUP TRANSMISSION CONFIGURATION #================================================= -ynh_script_progression --message="Backing up transmission configuration..." ynh_backup --src_path="/etc/transmission-daemon/settings.json" if [ -e /proc/sys/net/core/rmem_max ] @@ -50,7 +51,6 @@ fi #================================================= # BACKUP DATA #================================================= -ynh_script_progression --message="Backing up transmission data..." ynh_backup --src_path="/usr/share/transmission" ynh_backup --src_path="/var/lib/transmission-daemon" @@ -61,4 +61,4 @@ ynh_backup --src_path="/home/yunohost.transmission" --is_big # END OF SCRIPT #================================================= -ynh_script_progression --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." --last +ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." diff --git a/scripts/change_url b/scripts/change_url index 7fbfbb2..4067ead 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -51,30 +51,30 @@ fi #================================================= # STOP SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Stopping transmission..." --weight=2 +ynh_script_progression --message="Stopping Transmission..." --weight=2 ynh_systemd_action --service_name=transmission-daemon --action=stop #================================================= # MODIFY URL IN NGINX CONF #================================================= -ynh_script_progression --message="Updating nginx web server configuration..." --weight=2 +ynh_script_progression --message="Updating NGINX web server configuration..." --weight=2 nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf -# Change the path in the nginx config file +# 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 + # Make a backup of the original NGINX config file if modified ynh_backup_if_checksum_is_different --file="$nginx_conf_path" - # Set global variables for nginx helper + # Set global variables for NGINX helper domain="$old_domain" path_url="$new_path" - # Create a dedicated nginx config + # Create a dedicated NGINX config ynh_add_nginx_config fi -# Change the domain for nginx +# Change the domain for NGINX if [ $change_domain -eq 1 ] then # Delete file checksum for the old conf file location @@ -104,7 +104,7 @@ ynh_systemd_action --service_name=transmission-daemon --action=start #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." +ynh_script_progression --message="Reloading NGINX web server..." ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/install b/scripts/install index 29b606e..27a184d 100644 --- a/scripts/install +++ b/scripts/install @@ -30,9 +30,6 @@ app=$YNH_APP_INSTANCE_NAME #================================================= ynh_script_progression --message="Validating installation parameters..." -# Normalize the url path syntax -path_url=$(ynh_normalize_url_path $path_url) - # Register (book) web path ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url @@ -66,7 +63,7 @@ ynh_app_setting_set --app=$app --key=peer_port --value=$peer_port #================================================= # INSTALL TRANSMISSION #================================================= -ynh_script_progression --message="Installing transmission..." --weight=16 +ynh_script_progression --message="Installing Transmission..." --weight=16 ynh_install_app_dependencies $pkg_dependencies @@ -78,15 +75,15 @@ ynh_install_app_dependencies $pkg_dependencies # Explicitly reinstalling the package fixes the issue :| if [ ! -d /usr/share/transmission/ ] then - ynh_package_install transmission-common --reinstall + ynh_install_app_dependencies transmission-common --reinstall fi #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Configuring nginx web server..." --weight=2 +ynh_script_progression --message="Configuring NGINX web server..." --weight=2 -# Create a dedicated nginx config +# Create a dedicated NGINX config ynh_add_nginx_config #================================================= @@ -109,7 +106,7 @@ chmod -R 777 /home/yunohost.transmission/watched #================================================= # CONFIGURE TRANSMISSION #================================================= -ynh_script_progression --message="Configuring transmission..." --weight=2 +ynh_script_progression --message="Configuring Transmission..." --weight=2 # Transmission has to be stopped before modifying its config ynh_systemd_action --service_name=transmission-daemon --action=stop @@ -169,7 +166,7 @@ ynh_replace_string "
$" "
" /usr/share/transmission/web/index.html +#================================================= +# ADVERTISE SERVICE IN ADMIN PANEL +#================================================= + +yunohost service add transmission-daemon --description="BitTorrent Client" --log="/var/log/syslog" + #================================================= # START TRANSMISSION #================================================= -ynh_script_progression --message="Starting transmission..." --weight=2 +ynh_script_progression --message="Starting Transmission..." --weight=2 ynh_systemd_action --service_name=transmission-daemon --action=start @@ -190,7 +189,7 @@ ynh_systemd_action --service_name=transmission-daemon --action=start #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." +ynh_script_progression --message="Reloading NGINX web server..." ynh_systemd_action --service_name=nginx --action=reload diff --git a/transmission.jpg b/transmission.jpg new file mode 100644 index 0000000..ef875db Binary files /dev/null and b/transmission.jpg differ