Move the --nodaemon logic out of tahoe_run

We're always going to --nodaemon from now on
This commit is contained in:
Jean-Paul Calderone 2020-12-12 18:20:09 -05:00
parent f17a5dfafc
commit d8da612055
2 changed files with 1 additions and 10 deletions

View File

@ -195,13 +195,7 @@ def run(config):
# Now prepare to turn into a twistd process. This os.chdir is the point
# of no return.
os.chdir(basedir)
twistd_args = []
if (nodetype in (u"client", u"introducer")
and "--nodaemon" not in config.twistd_args
and "--syslog" not in config.twistd_args
and "--logfile" not in config.twistd_args):
fileutil.make_dirs(os.path.join(basedir, u"logs"))
twistd_args.extend(["--logfile", os.path.join("logs", "twistd.log")])
twistd_args = ["--nodaemon"]
twistd_args.extend(config.twistd_args)
twistd_args.append("DaemonizeTahoeNode") # point at our DaemonizeTahoeNodePlugin

View File

@ -10,6 +10,3 @@ __all__ = [
class RunOptions(_RunOptions):
subcommand_name = "run"
def postOptions(self):
self.twistd_args += ("--nodaemon",)