mirror of
https://github.com/YunoHost-Apps/deluge_ynh.git
synced 2024-09-03 18:25:52 +02:00
commit
a4c283aacf
8 changed files with 24 additions and 115 deletions
|
@ -34,8 +34,8 @@ Deluge is a lightweight, Free Software, cross-platform BitTorrent client.
|
|||
|
||||
## Documentation and resources
|
||||
|
||||
* Official app website: <https://dev.deluge-torrent.org/>
|
||||
* Official admin documentation: <https://yunohost.org/packaging_apps>
|
||||
* Official app website: <https://www.deluge-torrent.org/>
|
||||
* Official admin documentation: <https://deluge.readthedocs.io/en/latest/>
|
||||
* Upstream app code repository: <https://git.deluge-torrent.org/deluge>
|
||||
* YunoHost documentation for this app: <https://yunohost.org/app_deluge>
|
||||
* Report a bug: <https://github.com/YunoHost-Apps/deluge_ynh/issues>
|
||||
|
|
|
@ -32,8 +32,8 @@ Deluge est un client BitTorrent léger, gratuit et multiplateforme.
|
|||
|
||||
## Documentations et ressources
|
||||
|
||||
* Site officiel de l’app : <https://dev.deluge-torrent.org/>
|
||||
* Documentation officielle de l’admin : <https://yunohost.org/packaging_apps>
|
||||
* Site officiel de l’app : <https://www.deluge-torrent.org/>
|
||||
* Documentation officielle de l’admin : <https://deluge.readthedocs.io/en/latest/>
|
||||
* Dépôt de code officiel de l’app : <https://git.deluge-torrent.org/deluge>
|
||||
* Documentation YunoHost pour cette app : <https://yunohost.org/app_deluge>
|
||||
* Signaler un bug : <https://github.com/YunoHost-Apps/deluge_ynh/issues>
|
||||
|
|
|
@ -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
|
||||
}
|
|
@ -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]
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue