summary refs log tree commit diff
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-04-30 17:12:15 +0100
committerMark Haines <mark.haines@matrix.org>2015-04-30 17:12:15 +0100
commitc95480963eed26af347c0d9a0ca47438b227e6ab (patch)
tree8c359425a0031e150e17b2e075c54c71b0c832bf
parentCan't specify bind-port on the cmdline anymore (diff)
downloadsynapse-c95480963eed26af347c0d9a0ca47438b227e6ab.tar.xz
read the pid_file from the config file in synctl
-rw-r--r--README.rst2
-rwxr-xr-xsynapse/app/synctl.py5
2 files changed, 4 insertions, 3 deletions
diff --git a/README.rst b/README.rst

index aad74585a4..c434262252 100644 --- a/README.rst +++ b/README.rst
@@ -318,7 +318,7 @@ ArchLinux If running `$ synctl start` fails with 'returned non-zero exit status 1', you will need to explicitly call Python2.7 - either running as:: - $ python2.7 -m synapse.app.homeserver --daemonize -c homeserver.yaml --pid-file homeserver.pid + $ python2.7 -m synapse.app.homeserver --daemonize -c homeserver.yaml ...or by editing synctl with the correct python executable. 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