From af19e3bc62c7a0bff54959d5b18848f0f541d685 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Mon, 20 Feb 2012 14:06:29 +0000 Subject: [PATCH] Fix setting daemon listen interface from command line --- deluge/core/daemon.py | 7 ++++++- deluge/main.py | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/deluge/core/daemon.py b/deluge/core/daemon.py index 255e93249..2fe61e64f 100644 --- a/deluge/core/daemon.py +++ b/deluge/core/daemon.py @@ -122,9 +122,14 @@ class Daemon(object): if options and options.config: deluge.configmanager.set_config_dir(options.config) + if options and options.listen_interface: + listen_interface = options.listen_interface + else: + listen_interface = "" + from deluge.core.core import Core # Start the core as a thread and join it until it's done - self.core = Core() + self.core = Core(listen_interface=listen_interface) port = self.core.config["daemon_port"] if options and options.port: diff --git a/deluge/main.py b/deluge/main.py index 2ab6178d7..dc1df9671 100644 --- a/deluge/main.py +++ b/deluge/main.py @@ -148,7 +148,7 @@ def start_daemon(): version= "%prog: " + deluge.common.get_version() + lt_version) parser.add_option("-p", "--port", dest="port", help="Port daemon will listen on", action="store", type="int") - parser.add_option("-i", "--interface", dest="interface", + parser.add_option("-i", "--interface", dest="listen_interface", help="Interface daemon will listen for bittorrent connections on, \ this should be an IP address", metavar="IFACE", action="store", type="str")