mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-20 09:46:18 +00:00
rename client.tac to tahoe-client.tac, so that 'ps ax|grep tahoe' works. Closes #156.
This commit is contained in:
parent
34a25b9b28
commit
ee72a5adfd
@ -49,7 +49,7 @@ def create_client(basedir, config, out=sys.stdout, err=sys.stderr):
|
||||
# we're willing to use an empty directory
|
||||
else:
|
||||
os.mkdir(basedir)
|
||||
f = open(os.path.join(basedir, "client.tac"), "w")
|
||||
f = open(os.path.join(basedir, "tahoe-client.tac"), "w")
|
||||
f.write(client_tac)
|
||||
f.close()
|
||||
if config.get('webport', "none").lower() != "none":
|
||||
@ -69,7 +69,7 @@ def create_introducer(basedir, config, out=sys.stdout, err=sys.stderr):
|
||||
# we're willing to use an empty directory
|
||||
else:
|
||||
os.mkdir(basedir)
|
||||
f = open(os.path.join(basedir, "introducer.tac"), "w")
|
||||
f = open(os.path.join(basedir, "tahoe-introducer.tac"), "w")
|
||||
f.write(introducer_tac)
|
||||
f.close()
|
||||
print >>out, "introducer created in %s" % basedir
|
||||
|
@ -34,9 +34,15 @@ def do_start(basedir, profile=False, out=sys.stdout, err=sys.stderr):
|
||||
if os.path.exists(os.path.join(basedir, "client.tac")):
|
||||
tac = "client.tac"
|
||||
type = "client"
|
||||
elif os.path.exists(os.path.join(basedir, "tahoe-client.tac")):
|
||||
tac = "tahoe-client.tac"
|
||||
type = "client"
|
||||
elif os.path.exists(os.path.join(basedir, "introducer.tac")):
|
||||
tac = "introducer.tac"
|
||||
type = "introducer"
|
||||
elif os.path.exists(os.path.join(basedir, "tahoe-introducer.tac")):
|
||||
tac = "tahoe-introducer.tac"
|
||||
type = "introducer"
|
||||
else:
|
||||
print >>err, "%s does not look like a node directory" % basedir
|
||||
if not os.path.isdir(basedir):
|
||||
|
@ -270,7 +270,7 @@ this file are ignored.
|
||||
pp = ClientWatcher()
|
||||
self.proc_done = pp.d = defer.Deferred()
|
||||
logfile = os.path.join(self.basedir, "client.log")
|
||||
cmd = ["twistd", "-n", "-y", "client.tac", "-l", logfile]
|
||||
cmd = ["twistd", "-n", "-y", "tahoe-client.tac", "-l", logfile]
|
||||
env = os.environ.copy()
|
||||
self.proc = reactor.spawnProcess(pp, cmd[0], cmd, env, path=clientdir)
|
||||
log.msg("CLIENT STARTED")
|
||||
|
@ -24,7 +24,7 @@ class CreateNode(unittest.TestCase):
|
||||
self.failUnlessEqual(out.getvalue(), "")
|
||||
self.failUnlessEqual(rc, 0)
|
||||
self.failUnless(os.path.exists(c1))
|
||||
self.failUnless(os.path.exists(os.path.join(c1, "client.tac")))
|
||||
self.failUnless(os.path.exists(os.path.join(c1, "tahoe-client.tac")))
|
||||
|
||||
# creating the client a second time should throw an exception
|
||||
out,err = StringIO(), StringIO()
|
||||
@ -37,7 +37,7 @@ class CreateNode(unittest.TestCase):
|
||||
argv = ["--quiet", "create-client", c2]
|
||||
runner.runner(argv)
|
||||
self.failUnless(os.path.exists(c2))
|
||||
self.failUnless(os.path.exists(os.path.join(c2, "client.tac")))
|
||||
self.failUnless(os.path.exists(os.path.join(c2, "tahoe-client.tac")))
|
||||
|
||||
self.failUnlessRaises(usage.UsageError,
|
||||
runner.runner,
|
||||
@ -54,7 +54,8 @@ class CreateNode(unittest.TestCase):
|
||||
self.failUnlessEqual(out.getvalue(), "")
|
||||
self.failUnlessEqual(rc, 0)
|
||||
self.failUnless(os.path.exists(c1))
|
||||
self.failUnless(os.path.exists(os.path.join(c1, "introducer.tac")))
|
||||
self.failUnless(os.path.exists(os.path.join(c1,
|
||||
"tahoe-introducer.tac")))
|
||||
|
||||
# creating the introducer a second time should throw an exception
|
||||
out,err = StringIO(), StringIO()
|
||||
@ -67,7 +68,8 @@ class CreateNode(unittest.TestCase):
|
||||
argv = ["--quiet", "create-introducer", c2]
|
||||
runner.runner(argv)
|
||||
self.failUnless(os.path.exists(c2))
|
||||
self.failUnless(os.path.exists(os.path.join(c2, "introducer.tac")))
|
||||
self.failUnless(os.path.exists(os.path.join(c2,
|
||||
"tahoe-introducer.tac")))
|
||||
|
||||
self.failUnlessRaises(usage.UsageError,
|
||||
runner.runner,
|
||||
|
Loading…
x
Reference in New Issue
Block a user