From: Brian Warner Date: Thu, 11 Oct 2007 09:01:23 +0000 (-0700) Subject: create_node: use a webport by default, on localhost:8011 X-Git-Tag: allmydata-tahoe-0.6.1~46 X-Git-Url: https://git.rkrishnan.org/pf/content/en/service/sitemap.html?a=commitdiff_plain;h=0f000784ce530f643dc01a88b5f5f01641078900;p=tahoe-lafs%2Ftahoe-lafs.git create_node: use a webport by default, on localhost:8011 --- diff --git a/src/allmydata/scripts/create_node.py b/src/allmydata/scripts/create_node.py index 76263e20..af20957c 100644 --- a/src/allmydata/scripts/create_node.py +++ b/src/allmydata/scripts/create_node.py @@ -6,6 +6,8 @@ from allmydata.scripts.common import BasedirMixin, NoDefaultBasedirMixin class CreateClientOptions(BasedirMixin, usage.Options): optParameters = [ ["basedir", "C", None, "which directory to create the client in"], + ["webport", "p", "tcp:8011:interface=127.0.0.1", + "which TCP port to run the HTTP interface on. Use 'none' to disable."], ] class CreateIntroducerOptions(NoDefaultBasedirMixin, usage.Options): @@ -50,6 +52,10 @@ def create_client(basedir, config, out=sys.stdout, err=sys.stderr): f = open(os.path.join(basedir, "client.tac"), "w") f.write(client_tac) f.close() + if config['webport'].lower() != "none": + f = open(os.path.join(basedir, "webport"), "w") + f.write(config['webport'] + "\n") + f.close() print >>out, "client created in %s" % basedir print >>out, " please copy introducer.furl and vdrive.furl into the directory"