mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-01 10:46:42 +00:00
Put the pidfile in the right place
Seems we relied on the chdir for that to happen, previously.
This commit is contained in:
parent
70305131f1
commit
6e152daf05
@ -202,7 +202,9 @@ def run(config, runApp=twistd.runApp):
|
||||
if not nodetype:
|
||||
print("%s is not a recognizable node directory" % quoted_basedir, file=err)
|
||||
return 1
|
||||
twistd_args = ["--nodaemon", "--rundir", basedir]
|
||||
|
||||
pidfile = get_pidfile(basedir)
|
||||
twistd_args = ["--nodaemon", "--rundir", basedir, "--pidfile", pidfile]
|
||||
twistd_args.extend(config.twistd_args)
|
||||
twistd_args.append("DaemonizeTahoeNode") # point at our DaemonizeTahoeNodePlugin
|
||||
|
||||
@ -219,7 +221,6 @@ def run(config, runApp=twistd.runApp):
|
||||
twistd_config.loadedPlugins = {"DaemonizeTahoeNode": DaemonizeTahoeNodePlugin(nodetype, basedir)}
|
||||
|
||||
# handle invalid PID file (twistd might not start otherwise)
|
||||
pidfile = get_pidfile(basedir)
|
||||
if get_pid_from_pidfile(pidfile) == -1:
|
||||
print("found invalid PID file in %s - deleting it" % basedir, file=err)
|
||||
os.remove(pidfile)
|
||||
|
Loading…
Reference in New Issue
Block a user