add a --helper command-line option to 'tahoe create-node'

This commit is contained in:
meejah 2019-08-06 18:17:58 -06:00
parent ba5f44354b
commit eb0a582d1c
2 changed files with 6 additions and 1 deletions

View File

@ -207,6 +207,7 @@ def _create_node(reactor, request, temp_dir, introducer_furl, flog_gatherer, nam
'--shares-needed', unicode(needed),
'--shares-happy', unicode(happy),
'--shares-total', unicode(total),
'--helper',
]
if not storage:
args.append('--no-storage')

View File

@ -180,6 +180,7 @@ class CreateNodeOptions(CreateClientOptions):
optFlags = [
("no-storage", None, "Do not offer storage service to other nodes."),
("storage-dir", None, "Path where the storage will be placed."),
("helper", None, "Enable helper"),
] + TOR_FLAGS + I2P_FLAGS
synopsis = "[options] [NODEDIR]"
@ -334,7 +335,10 @@ def write_client_config(c, config):
c.write("[helper]\n")
c.write("# Shall this node run a helper service that clients can use?\n")
c.write("enabled = false\n")
if config.get("helper"):
c.write("enabled = true\n")
else:
c.write("enabled = false\n")
c.write("\n")