From d1adb19b8af839afcb4fa4d302abb7036a9acd0a Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 2 Oct 2014 10:38:11 +0100 Subject: [PATCH 1/2] Re-apply a0b1b34c71e46304f7024f0570db92f4577303b5 to master (fixing synctl) --- synctl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/synctl b/synctl index 0f83e9cb1..7523fd3db 100755 --- a/synctl +++ b/synctl @@ -1,6 +1,6 @@ #!/bin/bash -SYNAPSE="synapse/app/homeserver.py" +SYNAPSE="python -m synapse.app.homeserver" CONFIGFILE="homeserver.yaml" PIDFILE="homeserver.pid" @@ -14,7 +14,7 @@ case "$1" in start) if [ ! -f "$CONFIGFILE" ]; then echo "No config file found" - echo "To generate a config file, run 'python --generate-config'" + echo "To generate a config file, run '$SYNAPSE -c $CONFIGFILE --generate-config'" exit 1 fi From 7a322b63264acbef7e60b511ad8d39ae4718386b Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 2 Oct 2014 10:43:22 +0100 Subject: [PATCH 2/2] Update README setup instructions to be correct. Make synapse spit out explanatory note when generating config to tell people to look at it and customise it. --- README.rst | 12 +++++++----- synapse/config/_base.py | 1 + 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/README.rst b/README.rst index 6f7940e74..1530e5caa 100644 --- a/README.rst +++ b/README.rst @@ -46,11 +46,13 @@ To get up and running: - To simply play with an **existing** homeserver you can just go straight to http://matrix.org/alpha. - - To run your own **private** homeserver on localhost:8008, install synapse with - ``python setup.py develop --user`` and then run ``./synctl start`` twice (once to - generate a config; once to actually run) - you will find a webclient running at - http://localhost:8008. Please use a recent Chrome, Safari or Firefox for now... - + - To run your own **private** homeserver on localhost:8008, generate a basic + config file: ``./synctl start`` will give you instructions on how to do this. + Once you've done so, running ``./synctl start`` again will start your private + home sserver. You will find a webclient running at http://localhost:8008. + Please use a recent Chrome or Firefox for now (or Safari if you don't need + VoIP support). + - To run a **public** homeserver and let it exchange messages with other homeservers and participate in the global Matrix federation, you must expose port 8448 to the internet and edit homeserver.yaml to specify server_name (the public DNS entry for diff --git a/synapse/config/_base.py b/synapse/config/_base.py index 35bcece2c..809f9c922 100644 --- a/synapse/config/_base.py +++ b/synapse/config/_base.py @@ -123,6 +123,7 @@ class Config(object): # style mode markers into the file, to hint to people that # this is a YAML file. yaml.dump(config, config_file, default_flow_style=False) + print "A config file has been generated in %s (your server name is '%s'). Please review this file and customise it to your needs." % (config_args.config_path, config['server_name']) sys.exit(0) return cls(args)