diff options
author | David Baker <dave@matrix.org> | 2015-05-07 09:33:42 +0100 |
---|---|---|
committer | David Baker <dave@matrix.org> | 2015-05-07 09:33:42 +0100 |
commit | 97a64f3ebeaac9d9e97699f41751e272fc0c1c73 (patch) | |
tree | 30369edfc0af5da6f41f32932936ec363e844787 /synapse/app/synctl.py | |
parent | Typo (diff) | |
parent | Optional profiling using cProfile (diff) | |
download | synapse-97a64f3ebeaac9d9e97699f41751e272fc0c1c73.tar.xz |
Merge branch 'develop' of github.com:matrix-org/synapse into develop
Diffstat (limited to 'synapse/app/synctl.py')
-rwxr-xr-x | synapse/app/synctl.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/synapse/app/synctl.py b/synapse/app/synctl.py index 0a2b0d6fcd..1f7d543c31 100755 --- a/synapse/app/synctl.py +++ b/synapse/app/synctl.py @@ -27,20 +27,21 @@ CONFIGFILE = "homeserver.yaml" GREEN = "\x1b[1;32m" NORMAL = "\x1b[m" +if not os.path.exists(CONFIGFILE): + sys.stderr.write( + "No config file found\n" + "To generate a config file, run '%s -c %s --generate-config" + " --server-name=<server name>'\n" % ( + " ".join(SYNAPSE), CONFIGFILE + ) + ) + sys.exit(1) + CONFIG = yaml.load(open(CONFIGFILE)) PIDFILE = CONFIG["pid_file"] def start(): - if not os.path.exists(CONFIGFILE): - sys.stderr.write( - "No config file found\n" - "To generate a config file, run '%s -c %s --generate-config" - " --server-name=<server name>'\n" % ( - " ".join(SYNAPSE), CONFIGFILE - ) - ) - sys.exit(1) print "Starting ...", args = SYNAPSE args.extend(["--daemonize", "-c", CONFIGFILE]) |