fixes to configurations

This commit is contained in:
gmega 2024-10-29 11:52:27 -03:00
parent ed08ed4c22
commit 18764a904a
No known key found for this signature in database
GPG Key ID: 6290D34EAD824B18
3 changed files with 36 additions and 5 deletions

View File

@ -54,6 +54,9 @@ class AlertManager(component.Component):
| lt.alert.category_t.performance_warning
| lt.alert.category_t.file_progress_notification
| lt.alert.category_t.piece_progress_notification
| lt.alert.category_t.torrent_log_notification
| lt.alert.category_t.peer_log_notification
| lt.alert.category_t.peer_notification
)
self.session.apply_settings({'alert_mask': alert_mask})

View File

@ -31,9 +31,24 @@ OPTIONS = [
),
ConfigOption(
'DELUGE_TORRENTFILE_DIR',
default='/var/lib/deluge/torrentfiles',
default='/var/lib/deluge/downloads',
description='Directory where known torrent files should be stored',
),
ConfigOption(
'DELUGE_PLUGINS_DIR',
default='/var/lib/deluge/plugins',
description='Directory where Deluge plugins should be stored',
),
ConfigOption(
'DELUGE_DAEMON_USERNAME',
default='user',
description='Deluge daemon username',
),
ConfigOption(
'DELUGE_DAEMON_PASSWORD',
default='password',
description='Deluge daemon password',
),
ConfigOption(
name='DELUGE_RPC_PORT',
default='9889',
@ -73,15 +88,27 @@ def main():
defaults = copy.deepcopy(DEFAULT_PREFS)
# No DHT or we may inadvertently join the global DHT
defaults['dht'] = False
# Allow the daemon to be driven from other IPs.
defaults['allow_remote'] = True
# Pin ports and interfaces.
defaults['random_port'] = False
defaults['listen_random_port'] = None
defaults['listen_interface'] = options['DELUGE_EXTERNAL_IP']
defaults['outgoing_interface'] = options['DELUGE_EXTERNAL_IP']
defaults['daemon_port'] = int(options['DELUGE_RPC_PORT'])
defaults['download_location'] = options['DELUGE_DOWNLOAD_DIR']
defaults['torrentfiles_location'] = options['DELUGE_TORRENTFILE_DIR']
defaults['listen_ports'] = [int(p) for p in options['DELUGE_LISTEN_PORTS'].split(',')]
# File and plugin locations.
defaults['download_location'] = options['DELUGE_DOWNLOAD_DIR']
defaults['move_completed_path'] = options['DELUGE_DOWNLOAD_DIR']
defaults['torrentfiles_location'] = options['DELUGE_TORRENTFILE_DIR']
defaults['plugins_location'] = options['DELUGE_PLUGINS_DIR']
manager = ConfigManager('core.conf', defaults=defaults)
manager.save()

View File

@ -3,8 +3,9 @@ FROM continuumio/miniconda3:24.9.2-0
ENV DELUGE_APP=/opt/deluge
ENV DELUGE_CONFIG_DIR=/var/lib/deluge
ENV DELUGE_DOWNLOAD_DIR=/var/lib/deluge/download
ENV DELUGE_TORRENTFILE_DIR=/var/lib/deluge/torrents
ENV DELUGE_DOWNLOAD_DIR=/var/lib/deluge/downloads
ENV DELUGE_TORRENTFILE_DIR=/var/lib/deluge/downloads
ENV DELUGE_PLUGINS_DIR=/var/lib/deluge/plugins
ENV DELUGE_RPC_PORT=6890
ENV DELUGE_LISTEN_PORTS=6891,6892