diff options
author | Erik Johnston <erik@matrix.org> | 2014-11-26 12:06:36 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-11-26 12:06:36 +0000 |
commit | 48ee9ddb22b36f1adc23290e76287a922488596d (patch) | |
tree | d9eccedd90f9c573634c5456cfbbb65684214c6e /synapse/app/synctl.py | |
parent | Use tagged version of matrix-angular-sdk (diff) | |
parent | Bump version numbers and change log (diff) | |
download | synapse-5a8571e1dea7f946f72e2923f800166f371ce87a.tar.xz |
Merge branch 'release-v0.5.1' of github.com:matrix-org/synapse v0.5.1
Diffstat (limited to 'synapse/app/synctl.py')
-rwxr-xr-x | synapse/app/synctl.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/synapse/app/synctl.py b/synapse/app/synctl.py index abe055a64c..52a0b729f4 100755 --- a/synapse/app/synctl.py +++ b/synapse/app/synctl.py @@ -21,11 +21,12 @@ import signal SYNAPSE = ["python", "-m", "synapse.app.homeserver"] -CONFIGFILE="homeserver.yaml" -PIDFILE="homeserver.pid" +CONFIGFILE = "homeserver.yaml" +PIDFILE = "homeserver.pid" + +GREEN = "\x1b[1;32m" +NORMAL = "\x1b[m" -GREEN="\x1b[1;32m" -NORMAL="\x1b[m" def start(): if not os.path.exists(CONFIGFILE): @@ -43,12 +44,14 @@ def start(): subprocess.check_call(args) print GREEN + "started" + NORMAL + def stop(): if os.path.exists(PIDFILE): pid = int(open(PIDFILE).read()) os.kill(pid, signal.SIGTERM) print GREEN + "stopped" + NORMAL + def main(): action = sys.argv[1] if sys.argv[1:] else "usage" if action == "start": @@ -62,5 +65,6 @@ def main(): sys.stderr.write("Usage: %s [start|stop|restart]\n" % (sys.argv[0],)) sys.exit(1) -if __name__=='__main__': + +if __name__ == "__main__": main() |