Fix setting daemon listen interface from command line

This commit is contained in:
Calum Lind 2012-02-20 14:06:29 +00:00
parent 40e4fb9b8e
commit af19e3bc62
2 changed files with 7 additions and 2 deletions

View File

@ -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:

View File

@ -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")