Some changes to make the testing script run on mac, too, + a multithreaded server for riot
This commit is contained in:
parent
4aad156b92
commit
04b64dbae9
7 changed files with 57 additions and 17 deletions
|
@ -1,4 +1,6 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# config
|
||||
SYNAPSE_BRANCH=develop
|
||||
INSTALLATION_NAME=consent
|
||||
|
@ -6,7 +8,7 @@ SERVER_DIR=installations/$INSTALLATION_NAME
|
|||
CONFIG_TEMPLATE=consent
|
||||
PORT=5005
|
||||
# set current directory to script directory
|
||||
BASE_DIR=$(readlink -f $(dirname $0))
|
||||
BASE_DIR=$(cd $(dirname $0) && pwd)
|
||||
|
||||
if [ -d $BASE_DIR/$SERVER_DIR ]; then
|
||||
echo "synapse is already installed"
|
||||
|
@ -22,9 +24,17 @@ mv synapse-$SYNAPSE_BRANCH $SERVER_DIR
|
|||
cd $SERVER_DIR
|
||||
virtualenv -p python2.7 env
|
||||
source env/bin/activate
|
||||
pip install --upgrade pip
|
||||
|
||||
# Having been bitten by pip SSL fail too many times, I don't trust the existing pip
|
||||
# to be able to --upgrade itself, so grab a new one fresh from source.
|
||||
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
|
||||
python get-pip.py
|
||||
|
||||
pip install --upgrade setuptools
|
||||
python synapse/python_dependencies.py | xargs pip install
|
||||
pip install lxml mock
|
||||
pip install .
|
||||
|
||||
python -m synapse.app.homeserver \
|
||||
--server-name localhost \
|
||||
--config-path homeserver.yaml \
|
||||
|
@ -32,8 +42,11 @@ python -m synapse.app.homeserver \
|
|||
--report-stats=no
|
||||
# apply configuration
|
||||
cp -r $BASE_DIR/config-templates/$CONFIG_TEMPLATE/. ./
|
||||
sed -i "s#{{SYNAPSE_ROOT}}#$(pwd)/#g" homeserver.yaml
|
||||
sed -i "s#{{SYNAPSE_PORT}}#${PORT}#g" homeserver.yaml
|
||||
sed -i "s#{{FORM_SECRET}}#$(uuidgen)#g" homeserver.yaml
|
||||
sed -i "s#{{REGISTRATION_SHARED_SECRET}}#$(uuidgen)#g" homeserver.yaml
|
||||
sed -i "s#{{MACAROON_SECRET_KEY}}#$(uuidgen)#g" homeserver.yaml
|
||||
|
||||
# Hashes used instead of slashes because we'll get a value back from $(pwd) that'll be
|
||||
# full of un-escapable slashes.
|
||||
sed -i '' "s#{{SYNAPSE_ROOT}}#$(pwd)/#g" homeserver.yaml
|
||||
sed -i '' "s#{{SYNAPSE_PORT}}#${PORT}#g" homeserver.yaml
|
||||
sed -i '' "s#{{FORM_SECRET}}#$(uuidgen)#g" homeserver.yaml
|
||||
sed -i '' "s#{{REGISTRATION_SHARED_SECRET}}#$(uuidgen)#g" homeserver.yaml
|
||||
sed -i '' "s#{{MACAROON_SECRET_KEY}}#$(uuidgen)#g" homeserver.yaml
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue