diff --git a/deluge/core/alertmanager.py b/deluge/core/alertmanager.py index 1323c6b37..c5f7b7040 100644 --- a/deluge/core/alertmanager.py +++ b/deluge/core/alertmanager.py @@ -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}) diff --git a/docker/bin/create_config.py b/docker/bin/create_config.py index 203e4c514..112aac340 100644 --- a/docker/bin/create_config.py +++ b/docker/bin/create_config.py @@ -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() diff --git a/docker/deluge.Dockerfile b/docker/deluge.Dockerfile index 25f284f5d..ad5173069 100644 --- a/docker/deluge.Dockerfile +++ b/docker/deluge.Dockerfile @@ -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