mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-21 02:01:31 +00:00
startstop_node now works if the logs directory already exists
Thanks to Arno and Arch for pointing this out.
This commit is contained in:
parent
57800e84b4
commit
524c9f1fc2
@ -2,6 +2,7 @@
|
||||
import os, sys, signal, time, subprocess
|
||||
from twisted.python import usage
|
||||
from allmydata.scripts.common import BasedirMixin
|
||||
from allmydata.util import fileutil
|
||||
from twisted.python.procutils import which
|
||||
|
||||
class StartOptions(BasedirMixin, usage.Options):
|
||||
@ -70,7 +71,7 @@ def do_start(basedir, config, out=sys.stdout, err=sys.stderr):
|
||||
print >>err, " in fact, it doesn't look like a directory at all!"
|
||||
sys.exit(1)
|
||||
twistd = find_twistd()
|
||||
os.mkdir(os.path.join(basedir, "logs"))
|
||||
fileutil.make_dirs(os.path.join(basedir, "logs"))
|
||||
cmd = ["python", twistd, "-y", tac, "--logfile", "logs/twistd.log"]
|
||||
rc = subprocess.call(cmd, cwd=basedir)
|
||||
if rc == 0:
|
||||
|
Loading…
x
Reference in New Issue
Block a user