mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-02 22:48:40 +00:00
Fix setting daemon listen interface from command line
This commit is contained in:
parent
7847362dbb
commit
ff95d9720a
2 changed files with 7 additions and 2 deletions
|
@ -133,9 +133,14 @@ class Daemon(object):
|
||||||
if options and options.config:
|
if options and options.config:
|
||||||
deluge.configmanager.set_config_dir(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
|
from deluge.core.core import Core
|
||||||
# Start the core as a thread and join it until it's done
|
# 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"]
|
port = self.core.config["daemon_port"]
|
||||||
if options and options.port:
|
if options and options.port:
|
||||||
|
|
|
@ -138,7 +138,7 @@ def start_daemon():
|
||||||
version= "%prog: " + deluge.common.get_version() + lt_version)
|
version= "%prog: " + deluge.common.get_version() + lt_version)
|
||||||
parser.add_option("-p", "--port", dest="port",
|
parser.add_option("-p", "--port", dest="port",
|
||||||
help="Port daemon will listen on", action="store", type="int")
|
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, \
|
help="Interface daemon will listen for bittorrent connections on, \
|
||||||
this should be an IP address", metavar="IFACE",
|
this should be an IP address", metavar="IFACE",
|
||||||
action="store", type="str")
|
action="store", type="str")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue