From c95480963eed26af347c0d9a0ca47438b227e6ab Mon Sep 17 00:00:00 2001 From: Mark Haines Date: Thu, 30 Apr 2015 17:12:15 +0100 Subject: read the pid_file from the config file in synctl --- synapse/app/synctl.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'synapse/app') diff --git a/synapse/app/synctl.py b/synapse/app/synctl.py index 3a70a248dc..462dfb7d73 100755 --- a/synapse/app/synctl.py +++ b/synapse/app/synctl.py @@ -22,11 +22,12 @@ import signal SYNAPSE = ["python", "-B", "-m", "synapse.app.homeserver"] CONFIGFILE = "homeserver.yaml" -PIDFILE = "homeserver.pid" GREEN = "\x1b[1;32m" NORMAL = "\x1b[m" +CONFIG = yaml.load(open(CONFIGFILE)) +PIDFILE = CONFIG["pid_file"] def start(): if not os.path.exists(CONFIGFILE): @@ -40,7 +41,7 @@ def start(): sys.exit(1) print "Starting ...", args = SYNAPSE - args.extend(["--daemonize", "-c", CONFIGFILE, "--pid-file", PIDFILE]) + args.extend(["--daemonize", "-c", CONFIGFILE]) subprocess.check_call(args) print GREEN + "started" + NORMAL -- cgit 1.4.1