From: Petr Štetiar Date: Fri, 19 Mar 2021 20:54:30 +0000 (+0100) Subject: phase1,phase2: fix reconfig command by creating twistd.pid X-Git-Tag: v1~22 X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=564eefcf29e83bd3d5481f367f7a3c102eb55fcf;p=buildbot.git phase1,phase2: fix reconfig command by creating twistd.pid Currently it's not possible to reconfig buildmaster as twistd.pid is missing so fix it by creating one manually. Signed-off-by: Petr Štetiar --- diff --git a/phase1/master.cfg b/phase1/master.cfg index 53d1812..363d77e 100644 --- a/phase1/master.cfg +++ b/phase1/master.cfg @@ -41,6 +41,10 @@ from buildbot.steps.transfer import StringDownload from buildbot.worker import Worker +if not os.path.exists("twistd.pid"): + with open("twistd.pid", "w") as pidfile: + pidfile.write("{}".format(os.getpid())) + # This is a sample buildmaster config file. It must be installed as # 'master.cfg' in your buildmaster's base directory. diff --git a/phase2/master.cfg b/phase2/master.cfg index a54c191..4d5e595 100644 --- a/phase2/master.cfg +++ b/phase2/master.cfg @@ -37,6 +37,10 @@ from buildbot.steps.transfer import StringDownload from buildbot.worker import Worker +if not os.path.exists("twistd.pid"): + with open("twistd.pid", "w") as pidfile: + pidfile.write("{}".format(os.getpid())) + ini = configparser.ConfigParser() ini.read(os.getenv("BUILDMASTER_CONFIG", "./config.ini"))