diff --git a/README.md b/README.md index d88cdbd..542ec9a 100644 --- a/README.md +++ b/README.md @@ -34,8 +34,8 @@ Deluge is a lightweight, Free Software, cross-platform BitTorrent client. ## Documentation and resources -* Official app website: -* Official admin documentation: +* Official app website: +* 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..6a5842e 100644 --- a/README_fr.md +++ b/README_fr.md @@ -32,8 +32,8 @@ Deluge est un client BitTorrent léger, gratuit et multiplateforme. ## Documentations et ressources -* Site officiel de l’app : -* Documentation officielle de l’admin : +* Site officiel de l’app : +* Documentation officielle de l’admin : * Dépôt de code officiel de l’app : * Documentation YunoHost pour cette app : * Signaler un bug : 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 -} diff --git a/manifest.toml b/manifest.toml index 58cfcce..7c5ff78 100644 --- a/manifest.toml +++ b/manifest.toml @@ -11,8 +11,8 @@ maintainers = ["eric_G"] [upstream] license = "GPL-3.0-or-later" -website = "https://dev.deluge-torrent.org/" -admindoc = "https://yunohost.org/packaging_apps" +website = "https://www.deluge-torrent.org/" +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/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..fdda622 100755 --- a/scripts/remove +++ b/scripts/remove @@ -30,9 +30,12 @@ then fi ynh_remove_systemd_config +ynh_remove_systemd_config --service=${app}-web ynh_remove_nginx_config +ynh_remove_logrotate + ynh_secure_remove --file="/var/log/$app" #================================================= diff --git a/scripts/restore b/scripts/restore index 6e9995e..509c0ee 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