mirror of
https://github.com/YunoHost-Apps/transmission_ynh.git
synced 2024-09-04 01:46:12 +02:00
Testing (#104)
* Auto-update README * Bullseye (#95) * Upgrade to bullseye * Auto-update README * Auto-update README * Update check_process * Update manifest.json Co-authored-by: yunohost-bot <yunohost@yunohost.org> * Update manifest.json * Update upgrade * Auto-update README * Version 2 (#99) * Update install * v2 * Auto-update README * v2 * fix * Auto-update README * Delete updater.sh * fix * fix * Update restore * fix * Update manifest.toml * add sudirs * Update install * cleaning * Update upgrade * Update tests.toml * Update manifest.toml * Update manifest.toml * cleaning * Auto-update README * cleaning * fix --------- Co-authored-by: yunohost-bot <yunohost@yunohost.org> * Auto-update README * Update manifest.toml * Auto-update README * Update upgrade * Update tests.toml * Fix upgrade script for old versions (#102) We moved from /home/yunohost.transmission to /home/yunohost.app/transmission. Dangling symlinks might exist in the $MEDIA_DIRECTORY... Removing this before ynh_multimedia_build_main_dir will fix this, and the symlinks will be recreated after by ynh_multimedia_addfolder. Also, we're using rm and not ynh_secure_remove because of https://github.com/YunoHost/issues/issues/2253 * Update manifest.toml * Auto-update README * Update remove * Update upgrade * cleaning * Update upgrade * Update install * Update manifest.toml * Update upgrade * Update manifest.toml * Auto-update README --------- Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: Salamandar <6552989+Salamandar@users.noreply.github.com>
This commit is contained in:
parent
f5685f8c0c
commit
acb15e5dd5
8 changed files with 40 additions and 49 deletions
|
@ -23,7 +23,7 @@ Transmission is a fast, easy, and free BitTorrent client.
|
|||
* Integration with YunoHost Multimedia directories
|
||||
|
||||
|
||||
**Shipped version:** 3.00~ynh2
|
||||
**Shipped version:** 3.00~ynh3
|
||||
|
||||
## Screenshots
|
||||
|
||||
|
@ -34,7 +34,6 @@ Transmission is a fast, easy, and free BitTorrent client.
|
|||
* Official app website: <https://www.transmissionbt.com>
|
||||
* Official admin documentation: <https://github.com/transmission/transmission/wiki>
|
||||
* Upstream app code repository: <https://github.com/transmission/transmission>
|
||||
* YunoHost documentation for this app: <https://yunohost.org/app_transmission>
|
||||
* Report a bug: <https://github.com/YunoHost-Apps/transmission_ynh/issues>
|
||||
|
||||
## Developer info
|
||||
|
|
|
@ -23,7 +23,7 @@ Transmission est un client BitTorrent libre, efficace et simple.
|
|||
* Intégration avec les répertoires Multimédias de YunoHost
|
||||
|
||||
|
||||
**Version incluse :** 3.00~ynh2
|
||||
**Version incluse :** 3.00~ynh3
|
||||
|
||||
## Captures d’écran
|
||||
|
||||
|
@ -34,7 +34,6 @@ Transmission est un client BitTorrent libre, efficace et simple.
|
|||
* Site officiel de l’app : <https://www.transmissionbt.com>
|
||||
* Documentation officielle de l’admin : <https://github.com/transmission/transmission/wiki>
|
||||
* Dépôt de code officiel de l’app : <https://github.com/transmission/transmission>
|
||||
* Documentation YunoHost pour cette app : <https://yunohost.org/app_transmission>
|
||||
* Signaler un bug : <https://github.com/YunoHost-Apps/transmission_ynh/issues>
|
||||
|
||||
## Informations pour les développeurs
|
||||
|
|
|
@ -5,7 +5,7 @@ name = "Transmission"
|
|||
description.en = "Fast, Easy, and Free BitTorrent Client"
|
||||
description.fr = "Client BitTorrent libre et rapide"
|
||||
|
||||
version = "3.00~ynh2"
|
||||
version = "3.00~ynh3"
|
||||
|
||||
maintainers = []
|
||||
|
||||
|
@ -40,12 +40,6 @@ ram.runtime = "50M"
|
|||
|
||||
[resources]
|
||||
|
||||
[resources.ports]
|
||||
main.default = 9091
|
||||
main.exposed = "TCP"
|
||||
peer.default = 51413
|
||||
peer.exposed = "Both"
|
||||
|
||||
[resources.system_user]
|
||||
|
||||
[resources.install_dir]
|
||||
|
@ -60,5 +54,11 @@ ram.runtime = "50M"
|
|||
rpc.show_tile = false
|
||||
rpc.protected = true
|
||||
|
||||
[resources.ports]
|
||||
main.default = 9091
|
||||
main.exposed = "TCP"
|
||||
peer.default = 51413
|
||||
peer.exposed = "Both"
|
||||
|
||||
[resources.apt]
|
||||
packages = "transmission-daemon, transmission-cli, transmission-common, acl"
|
||||
|
|
|
@ -16,7 +16,7 @@ source /usr/share/yunohost/helpers
|
|||
#=================================================
|
||||
ynh_script_progression --message="Stopping a systemd service..." --weight=2
|
||||
|
||||
ynh_systemd_action --service_name=transmission-daemon --action="stop"
|
||||
ynh_systemd_action --service_name=transmission-daemon --action="stop" --log_path="systemd"
|
||||
|
||||
#=================================================
|
||||
# MODIFY URL IN NGINX CONF
|
||||
|
@ -44,7 +44,7 @@ ynh_store_file_checksum --file="/etc/transmission-daemon/settings.json"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Starting a systemd service..." --weight=2
|
||||
|
||||
ynh_systemd_action --service_name=transmission-daemon --action="start"
|
||||
ynh_systemd_action --service_name=transmission-daemon --action="start" --log_path="systemd"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
|
@ -19,9 +19,9 @@ ynh_app_setting_set --app=$app --key=rpcpassword --value="$rpcpassword"
|
|||
#=================================================
|
||||
# SPECIFIC SETUP
|
||||
#=================================================
|
||||
# CREATE DATA DIRECTORY
|
||||
# CREATE DATA DIRECTORY PERMISSIONS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Creating a data directory..."
|
||||
ynh_script_progression --message="Set data directory permissions..."
|
||||
|
||||
chmod -R 764 $data_dir
|
||||
chmod -R 775 $data_dir/watched
|
||||
|
@ -97,7 +97,7 @@ ynh_replace_string "<div id=\"toolbar-inspector\" title=\"Toggle Inspector\"></d
|
|||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..."
|
||||
|
||||
yunohost service add transmission-daemon --description="BitTorrent Client" --log=systemd --needs_exposed_ports="$port_peer"
|
||||
yunohost service add transmission-daemon --description="BitTorrent Client" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port_peer"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
|
@ -105,7 +105,7 @@ yunohost service add transmission-daemon --description="BitTorrent Client" --log
|
|||
ynh_script_progression --message="Starting a systemd service..."
|
||||
|
||||
# Start a systemd service
|
||||
ynh_systemd_action --service_name=transmission-daemon --action="start"
|
||||
ynh_systemd_action --service_name=transmission-daemon --action="start" --log_path="systemd"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
|
@ -32,6 +32,9 @@ ynh_secure_remove --file=/usr/share/transmission
|
|||
# And data
|
||||
ynh_secure_remove --file=/var/lib/transmission-daemon
|
||||
|
||||
# Removing old data_dir
|
||||
ynh_secure_remove --file="/home/yunohost.transmission"
|
||||
|
||||
# Kernel parameters
|
||||
if [ -e /proc/sys/net/core/rmem_max ]
|
||||
then
|
||||
|
|
|
@ -71,23 +71,18 @@ ynh_multimedia_addfolder --source_dir="$data_dir/watched" --dest_dir="share/Torr
|
|||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..."
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
||||
|
||||
yunohost service add transmission-daemon --description="BitTorrent Client" --log=systemd --needs_exposed_ports="$port_peer"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Starting a systemd service..."
|
||||
|
||||
ynh_systemd_action --service_name=transmission-daemon --action=start
|
||||
yunohost service add transmission-daemon --description="BitTorrent Client" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port_peer"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
# RELOAD NGINX AND PHP-FPM
|
||||
# RELOAD NGINX AND PHP-FPM OR THE APP SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reloading NGINX web server..." --weight=2
|
||||
ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=transmission-daemon --action=start --log_path="systemd"
|
||||
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
|
|
|
@ -20,9 +20,9 @@ upgrade_type=$(ynh_check_app_version_changed)
|
|||
#=================================================
|
||||
# STOP SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Stopping a systemd service..."
|
||||
ynh_script_progression --message="Stopping a systemd service..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=transmission-daemon --action="stop"
|
||||
ynh_systemd_action --service_name=transmission-daemon --action="stop" --log_path="systemd"
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
|
@ -32,26 +32,11 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." -
|
|||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC UPGRADE
|
||||
#=================================================
|
||||
# CREATE DATA DIRECTORY
|
||||
#=================================================
|
||||
ynh_script_progression --message="Creating a data directory..."
|
||||
|
||||
chmod -R 764 $data_dir
|
||||
chmod -R 775 $data_dir/watched
|
||||
chown -R debian-transmission:www-data "$data_dir"
|
||||
chown -R debian-transmission: $data_dir/{progress,watched}
|
||||
|
||||
#=================================================
|
||||
# UPDATE A CONFIG FILE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Updating a configuration file..." --weight=2
|
||||
|
||||
# Transmission has to be stopped before modifying its config
|
||||
ynh_systemd_action --service_name=transmission-daemon --action=stop
|
||||
|
||||
if [ "$path" != "/" ]
|
||||
then
|
||||
path_less="$path/"
|
||||
|
@ -59,7 +44,7 @@ else
|
|||
path_less="$path"
|
||||
fi
|
||||
|
||||
#ynh_add_config --template="../conf/settings.json" --destination="/etc/transmission-daemon/settings.json"
|
||||
ynh_add_config --template="../conf/settings.json" --destination="/etc/transmission-daemon/settings.json"
|
||||
|
||||
chmod 400 "/etc/transmission-daemon/settings.json"
|
||||
chown debian-transmission:debian-transmission "/etc/transmission-daemon/settings.json"
|
||||
|
@ -107,21 +92,31 @@ fi
|
|||
|
||||
ynh_replace_string "<div id=\"toolbar-inspector\" title=\"Toggle Inspector\"></div>$" "<div id=\"toolbar-inspector\" title=\"Toggle Inspector\"></div><div id=\"toolbar-separator\"></div><a href=\"../../downloads/\" id=\"toolbar-downloads\" title=\"Downloads\" target=\"_blank\"></a>" /usr/share/transmission/web/index.html
|
||||
|
||||
#=================================================
|
||||
# SET DATA DIRECTORY PERMISSIONS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Set data directory permissions..." --weight=1
|
||||
|
||||
chmod -R 764 $data_dir
|
||||
chmod -R 775 $data_dir/watched
|
||||
chown -R debian-transmission:www-data "$data_dir"
|
||||
chown -R debian-transmission: $data_dir/{progress,watched}
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..."
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
||||
|
||||
yunohost service add transmission-daemon --description="BitTorrent Client" --log=systemd --needs_exposed_ports="$port_peer"
|
||||
yunohost service add transmission-daemon --description="BitTorrent Client" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port_peer"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Starting a systemd service..." --weight=2
|
||||
|
||||
ynh_systemd_action --service_name=transmission-daemon --action="start"
|
||||
ynh_systemd_action --service_name=transmission-daemon --action="start" --log_path="systemd"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
Loading…
Reference in a new issue