summary refs log tree commit diff
path: root/synapse/app/synctl.py
diff options
context:
space:
mode:
authorDaniel Wagner-Hall <dawagner@gmail.com>2015-09-22 13:59:37 +0100
committerDaniel Wagner-Hall <dawagner@gmail.com>2015-09-22 13:59:37 +0100
commitf17aadd1b52463b51b8532cda074094ff2d0339b (patch)
tree2324815f78ea2fe5eebe29472ca5d169dd274953 /synapse/app/synctl.py
parentMerge pull request #276 from matrix-org/markjh/history_for_rooms_that_have_be... (diff)
parentAdd some docstrings (diff)
downloadsynapse-f17aadd1b52463b51b8532cda074094ff2d0339b.tar.xz
Merge pull request #285 from matrix-org/daniel/metrics-2
Implement configurable stats reporting
Diffstat (limited to 'synapse/app/synctl.py')
-rwxr-xr-xsynapse/app/synctl.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/synapse/app/synctl.py b/synapse/app/synctl.py

index 1f7d543c31..6bcc437591 100755 --- a/synapse/app/synctl.py +++ b/synapse/app/synctl.py
@@ -25,6 +25,7 @@ SYNAPSE = ["python", "-B", "-m", "synapse.app.homeserver"] CONFIGFILE = "homeserver.yaml" GREEN = "\x1b[1;32m" +RED = "\x1b[1;31m" NORMAL = "\x1b[m" if not os.path.exists(CONFIGFILE): @@ -45,8 +46,15 @@ def start(): print "Starting ...", args = SYNAPSE args.extend(["--daemonize", "-c", CONFIGFILE]) - subprocess.check_call(args) - print GREEN + "started" + NORMAL + try: + subprocess.check_call(args) + print GREEN + "started" + NORMAL + except subprocess.CalledProcessError as e: + print ( + RED + + "error starting (exit code: %d); see above for logs" % e.returncode + + NORMAL + ) def stop():