From 07c1ca4f083da238920c1c560741f21ca8638752 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 6 Aug 2023 16:05:46 +0200 Subject: [PATCH 1/8] Delete core.conf --- conf/core.conf | 95 -------------------------------------------------- 1 file changed, 95 deletions(-) delete mode 100644 conf/core.conf diff --git a/conf/core.conf b/conf/core.conf deleted file mode 100644 index 10e704f..0000000 --- a/conf/core.conf +++ /dev/null @@ -1,95 +0,0 @@ -{ - "file": 1, - "format": 1 -}{ - "add_paused": false, - "allow_remote": false, - "auto_manage_prefer_seeds": false, - "auto_managed": true, - "cache_expiry": 60, - "cache_size": 512, - "copy_torrent_file": false, - "daemon_port": 58846, - "del_copy_torrent_file": false, - "dht": true, - "dont_count_slow_torrents": false, - "download_location": "__INSTALL_DIR__/Downloads", - "download_location_paths_list": [], - "enabled_plugins": [], - "enc_in_policy": 1, - "enc_level": 2, - "enc_out_policy": 1, - "geoip_db_location": "/usr/share/GeoIP/GeoIP.dat", - "ignore_limits_on_local_network": true, - "info_sent": 0.0, - "listen_interface": "", - "listen_ports": [ - 6881, - 6891 - ], - "listen_random_port": 50479, - "listen_reuse_port": true, - "listen_use_sys_port": false, - "lsd": true, - "max_active_downloading": 3, - "max_active_limit": 8, - "max_active_seeding": 5, - "max_connections_global": 200, - "max_connections_per_second": 20, - "max_connections_per_torrent": -1, - "max_download_speed": -1.0, - "max_download_speed_per_torrent": -1, - "max_half_open_connections": 50, - "max_upload_slots_global": 4, - "max_upload_slots_per_torrent": -1, - "max_upload_speed": -1.0, - "max_upload_speed_per_torrent": -1, - "move_completed": false, - "move_completed_path": "__DATA_DIR__/Downloads", - "move_completed_paths_list": [], - "natpmp": true, - "new_release_check": false, - "outgoing_interface": "", - "outgoing_ports": [ - 0, - 0 - ], - "path_chooser_accelerator_string": "Tab", - "path_chooser_auto_complete_enabled": true, - "path_chooser_max_popup_rows": 20, - "path_chooser_show_chooser_button_on_localhost": true, - "path_chooser_show_hidden_files": false, - "peer_tos": "0x00", - "plugins_location": "__INSTALL_DIR__/.config/deluge/plugins", - "pre_allocate_storage": false, - "prioritize_first_last_pieces": false, - "proxy": { - "anonymous_mode": false, - "force_proxy": false, - "hostname": "", - "password": "", - "port": __PORT__, - "proxy_hostnames": true, - "proxy_peer_connections": true, - "proxy_tracker_connections": true, - "type": 0, - "username": "" - }, - "queue_new_to_top": false, - "random_outgoing_ports": true, - "random_port": true, - "rate_limit_ip_overhead": true, - "remove_seed_at_ratio": false, - "seed_time_limit": 180, - "seed_time_ratio_limit": 7.0, - "send_info": false, - "sequential_download": false, - "share_ratio_limit": 2.0, - "shared": false, - "stop_seed_at_ratio": false, - "stop_seed_ratio": 2.0, - "super_seeding": false, - "torrentfiles_location": "__DATA_DIR__/Downloads", - "upnp": true, - "utpex": true -} From c9a634e096596847567766aa3ca0a1b0789c90bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 6 Aug 2023 16:14:37 +0200 Subject: [PATCH 2/8] fix --- manifest.toml | 4 ++-- scripts/restore | 17 ++++------------- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/manifest.toml b/manifest.toml index 58cfcce..468db50 100644 --- a/manifest.toml +++ b/manifest.toml @@ -12,7 +12,7 @@ maintainers = ["eric_G"] [upstream] license = "GPL-3.0-or-later" website = "https://dev.deluge-torrent.org/" -admindoc = "https://yunohost.org/packaging_apps" +admindoc = "https://deluge.readthedocs.io/en/latest/" code = "https://git.deluge-torrent.org/deluge" [integration] @@ -22,7 +22,7 @@ multi_instance = false ldap = false sso = false disk = "50M" -ram.build = "50M" +ram.build = "100M" ram.runtime = "50M" [install] diff --git a/scripts/restore b/scripts/restore index 6e9995e..df8f13a 100755 --- a/scripts/restore +++ b/scripts/restore @@ -19,13 +19,6 @@ ynh_restore_file --origin_path="$install_dir" chown -R $app:www-data "$install_dir" -#================================================= -# RESTORE THE MYSQL DATABASE -#================================================= -ynh_script_progression --message="Restoring the MySQL database..." --weight=1 - -ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql - #================================================= # RESTORE SYSTEM CONFIGURATIONS #================================================= @@ -33,18 +26,15 @@ ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./ #================================================= ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1 -# This should be a symetric version of what happens in the install script - -ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" - ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/systemd/system/$app.service" +ynh_restore_file --origin_path="/etc/systemd/system/${app}-web.service" systemctl enable $app.service --quiet +systemctl enable ${app}-web.service --quiet yunohost service add $app --description="Lightweight BitTorrent client" --log="/var/log/$app/$app.log" - -ynh_restore_file --origin_path="/etc/logrotate.d/$app" +yunohost service add ${app}-web --description=BitTorrent UI --log=/var/log/$app/$app.log #================================================= # GENERIC FINALIZATION @@ -55,6 +45,7 @@ ynh_script_progression --message="Reloading NGINX web server and $app's service. # Typically you only have either $app or php-fpm but not both at the same time... ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=${app}-web --action="start" --log_path="/var/log/$app/$app.log" ynh_systemd_action --service_name=nginx --action=reload From dda98ff98b027f06fa0efa437b95e5f80123edc8 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 6 Aug 2023 14:14:41 +0000 Subject: [PATCH 3/8] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d88cdbd..b83ebd2 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Deluge is a lightweight, Free Software, cross-platform BitTorrent client. ## Documentation and resources * Official app website: -* Official admin documentation: +* Official admin documentation: * Upstream app code repository: * YunoHost documentation for this app: * Report a bug: diff --git a/README_fr.md b/README_fr.md index 3b106dd..55a7195 100644 --- a/README_fr.md +++ b/README_fr.md @@ -33,7 +33,7 @@ Deluge est un client BitTorrent léger, gratuit et multiplateforme. ## Documentations et ressources * Site officiel de l’app : -* Documentation officielle de l’admin : +* Documentation officielle de l’admin : * Dépôt de code officiel de l’app : * Documentation YunoHost pour cette app : * Signaler un bug : From ead1734685484b0aebea0d977a3250f2323975f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 6 Aug 2023 16:15:03 +0200 Subject: [PATCH 4/8] Update restore --- scripts/restore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index df8f13a..509c0ee 100755 --- a/scripts/restore +++ b/scripts/restore @@ -34,7 +34,7 @@ systemctl enable $app.service --quiet systemctl enable ${app}-web.service --quiet yunohost service add $app --description="Lightweight BitTorrent client" --log="/var/log/$app/$app.log" -yunohost service add ${app}-web --description=BitTorrent UI --log=/var/log/$app/$app.log +yunohost service add ${app}-web --description="BitTorrent UI" --log=/var/log/$app/$app.log #================================================= # GENERIC FINALIZATION From 0548b8bd4a4459e5bb9d57335955e29d3a3b4dd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 6 Aug 2023 16:18:31 +0200 Subject: [PATCH 5/8] fix --- scripts/backup | 7 +++++++ scripts/install | 3 +++ scripts/remove | 2 ++ 3 files changed, 12 insertions(+) diff --git a/scripts/backup b/scripts/backup index f8e82aa..b49e9de 100755 --- a/scripts/backup +++ b/scripts/backup @@ -27,11 +27,18 @@ ynh_backup --src_path="$install_dir" ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" +#================================================= +# BACKUP LOGROTATE +#================================================= + +ynh_backup --src_path="/etc/logrotate.d/$app" + #================================================= # BACKUP SYSTEMD #================================================= ynh_backup --src_path="/etc/systemd/system/$app.service" +ynh_backup --src_path="/etc/systemd/system/${app}-web.service" #================================================= # END OF SCRIPT diff --git a/scripts/install b/scripts/install index 89f9c3f..1c8257b 100755 --- a/scripts/install +++ b/scripts/install @@ -24,6 +24,9 @@ ynh_add_systemd_config --service="${app}-web" --template="deluge-web.service" yunohost service add $app --description="Lightweight BitTorrent client" --log="/var/log/$app/$app.log" yunohost service add ${app}-web --description="BitTorrent UI" --log="/var/log/$app/$app.log" +# Use logrotate to manage application logfile(s) +ynh_use_logrotate + mkdir -p /var/log/$app chown -R $app:$app /var/log/$app chmod -R 750 /var/log/$app diff --git a/scripts/remove b/scripts/remove index a950a6e..f865398 100755 --- a/scripts/remove +++ b/scripts/remove @@ -33,6 +33,8 @@ ynh_remove_systemd_config ynh_remove_nginx_config +ynh_remove_logrotate + ynh_secure_remove --file="/var/log/$app" #================================================= From 5d8855fe3a82fb471204d0cdebc9d5b5982b0663 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 6 Aug 2023 16:21:41 +0200 Subject: [PATCH 6/8] fix --- scripts/install | 2 +- scripts/remove | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 1c8257b..afabd27 100755 --- a/scripts/install +++ b/scripts/install @@ -22,7 +22,7 @@ ynh_add_systemd_config ynh_add_systemd_config --service="${app}-web" --template="deluge-web.service" yunohost service add $app --description="Lightweight BitTorrent client" --log="/var/log/$app/$app.log" -yunohost service add ${app}-web --description="BitTorrent UI" --log="/var/log/$app/$app.log" +#yunohost service add ${app}-web --description="BitTorrent UI" --log="/var/log/$app/$app.log" # Use logrotate to manage application logfile(s) ynh_use_logrotate diff --git a/scripts/remove b/scripts/remove index f865398..fdda622 100755 --- a/scripts/remove +++ b/scripts/remove @@ -30,6 +30,7 @@ then fi ynh_remove_systemd_config +ynh_remove_systemd_config --service=${app}-web ynh_remove_nginx_config From e64f49033b3e16ab3a5db6970a6a9b357c2cfd07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 6 Aug 2023 16:29:09 +0200 Subject: [PATCH 7/8] fix --- manifest.toml | 2 +- scripts/install | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index 468db50..7c5ff78 100644 --- a/manifest.toml +++ b/manifest.toml @@ -11,7 +11,7 @@ maintainers = ["eric_G"] [upstream] license = "GPL-3.0-or-later" -website = "https://dev.deluge-torrent.org/" +website = "https://www.deluge-torrent.org/" admindoc = "https://deluge.readthedocs.io/en/latest/" code = "https://git.deluge-torrent.org/deluge" diff --git a/scripts/install b/scripts/install index afabd27..1c8257b 100755 --- a/scripts/install +++ b/scripts/install @@ -22,7 +22,7 @@ ynh_add_systemd_config ynh_add_systemd_config --service="${app}-web" --template="deluge-web.service" yunohost service add $app --description="Lightweight BitTorrent client" --log="/var/log/$app/$app.log" -#yunohost service add ${app}-web --description="BitTorrent UI" --log="/var/log/$app/$app.log" +yunohost service add ${app}-web --description="BitTorrent UI" --log="/var/log/$app/$app.log" # Use logrotate to manage application logfile(s) ynh_use_logrotate From c5ac6c46bac3589a7c477b946fb067710f75c1eb Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 6 Aug 2023 14:29:13 +0000 Subject: [PATCH 8/8] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b83ebd2..542ec9a 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Deluge is a lightweight, Free Software, cross-platform BitTorrent client. ## Documentation and resources -* Official app website: +* Official app website: * Official admin documentation: * Upstream app code repository: * YunoHost documentation for this app: diff --git a/README_fr.md b/README_fr.md index 55a7195..6a5842e 100644 --- a/README_fr.md +++ b/README_fr.md @@ -32,7 +32,7 @@ Deluge est un client BitTorrent léger, gratuit et multiplateforme. ## Documentations et ressources -* Site officiel de l’app : +* Site officiel de l’app : * Documentation officielle de l’admin : * Dépôt de code officiel de l’app : * Documentation YunoHost pour cette app :