move everything to subfolder to merge into react-sdk

This commit is contained in:
Bruno Windels 2019-10-09 16:52:48 +02:00
parent 6cb9ef7e65
commit ca86969f92
47 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,2 @@
installations
synapse.zip

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,23 @@
<!doctype html>
<html lang="en">
<head>
<title>Test Privacy policy</title>
</head>
<body>
{% if has_consented %}
<p>
Thank you, you've already accepted the license.
</p>
{% else %}
<p>
Please accept the license!
</p>
<form method="post" action="consent">
<input type="hidden" name="v" value="{{version}}"/>
<input type="hidden" name="u" value="{{user}}"/>
<input type="hidden" name="h" value="{{userhmac}}"/>
<input type="submit" value="Sure thing!"/>
</form>
{% endif %}
</body>
</html>

View file

@ -0,0 +1,9 @@
<!doctype html>
<html lang="en">
<head>
<title>Test Privacy policy</title>
</head>
<body>
<p>Danke schon</p>
</body>
</html>

View file

@ -0,0 +1,47 @@
#!/bin/bash
set -e
# config
SYNAPSE_BRANCH=develop
INSTALLATION_NAME=consent
SERVER_DIR=installations/$INSTALLATION_NAME
CONFIG_TEMPLATE=consent
PORT=5005
# set current directory to script directory
BASE_DIR=$(cd $(dirname $0) && pwd)
if [ -d $BASE_DIR/$SERVER_DIR ]; then
echo "synapse is already installed"
exit
fi
cd $BASE_DIR
mkdir -p $SERVER_DIR
cd $SERVER_DIR
virtualenv -p python3 env
source env/bin/activate
# 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
pip install https://codeload.github.com/matrix-org/synapse/zip/$SYNAPSE_BRANCH
# apply configuration
pushd env/bin/
cp -r $BASE_DIR/config-templates/$CONFIG_TEMPLATE/. ./
# Hashes used instead of slashes because we'll get a value back from $(pwd) that'll be
# full of un-escapable slashes.
# Use .bak suffix as using no suffix doesn't work macOS.
sed -i.bak "s#{{SYNAPSE_ROOT}}#$(pwd)/#g" homeserver.yaml
sed -i.bak "s#{{SYNAPSE_PORT}}#${PORT}#g" homeserver.yaml
sed -i.bak "s#{{FORM_SECRET}}#$(uuidgen)#g" homeserver.yaml
sed -i.bak "s#{{REGISTRATION_SHARED_SECRET}}#$(uuidgen)#g" homeserver.yaml
sed -i.bak "s#{{MACAROON_SECRET_KEY}}#$(uuidgen)#g" homeserver.yaml
rm *.bak
popd
# generate signing keys for signing_key_path
python -m synapse.app.homeserver --generate-keys --config-dir env/bin/ -c env/bin/homeserver.yaml

View file

@ -0,0 +1,15 @@
#!/bin/bash
set -e
BASE_DIR=$(cd $(dirname $0) && pwd)
cd $BASE_DIR
cd installations/consent/env/bin/
source activate
LOGFILE=$(mktemp)
echo "Synapse log file at $LOGFILE"
./synctl start 2> $LOGFILE
EXIT_CODE=$?
if [ $EXIT_CODE -ne 0 ]; then
cat $LOGFILE
fi
exit $EXIT_CODE

View file

@ -0,0 +1,8 @@
#!/bin/bash
set -e
BASE_DIR=$(cd $(dirname $0) && pwd)
cd $BASE_DIR
cd installations/consent/env/bin/
source activate
./synctl stop