diff --git a/riot/install.sh b/riot/install.sh index 43b39611d7..9e7e5bb2da 100644 --- a/riot/install.sh +++ b/riot/install.sh @@ -6,15 +6,12 @@ if [[ -d $BASE_DIR/riot-web ]]; then exit fi - -pushd $BASE_DIR > /dev/null +cd $BASE_DIR curl -L https://github.com/vector-im/riot-web/archive/${RIOT_BRANCH}.zip --output riot.zip unzip riot.zip rm riot.zip mv riot-web-${RIOT_BRANCH} riot-web cp config-template/config.json riot-web/ -pushd riot-web > /dev/null +cd riot-web npm install npm run build -popd > /dev/null -popd > /dev/null diff --git a/riot/start.sh b/riot/start.sh index 5feb40eb2b..141d3176e7 100644 --- a/riot/start.sh +++ b/riot/start.sh @@ -1,10 +1,9 @@ PORT=8080 echo "running riot on http://localhost:$PORT..." BASE_DIR=$(realpath $(dirname $0)) -pushd $BASE_DIR > /dev/null +cd $BASE_DIR/ pushd riot-web/webapp/ > /dev/null python -m SimpleHTTPServer $PORT > /dev/null 2>&1 & PID=$! popd > /dev/null echo $PID > riot.pid -popd > /dev/null \ No newline at end of file diff --git a/riot/stop.sh b/riot/stop.sh index 59fef1dfd0..148116cfe6 100644 --- a/riot/stop.sh +++ b/riot/stop.sh @@ -1,6 +1,5 @@ BASE_DIR=$(realpath $(dirname $0)) -pushd $BASE_DIR > /dev/null +cd $BASE_DIR PIDFILE=riot.pid kill $(cat $PIDFILE) rm $PIDFILE -popd > /dev/null \ No newline at end of file diff --git a/synapse/install.sh b/synapse/install.sh index 959e529e6b..7170ce6d30 100644 --- a/synapse/install.sh +++ b/synapse/install.sh @@ -12,13 +12,13 @@ if [[ -d $BASE_DIR/$SERVER_DIR ]]; then exit fi -pushd $BASE_DIR > /dev/null +cd $BASE_DIR mkdir -p installations/ curl https://codeload.github.com/matrix-org/synapse/zip/$SYNAPSE_BRANCH --output synapse.zip unzip synapse.zip mv synapse-$SYNAPSE_BRANCH $SERVER_DIR -pushd $SERVER_DIR +cd $SERVER_DIR virtualenv -p python2.7 env source env/bin/activate pip install --upgrade pip @@ -36,5 +36,3 @@ 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 -popd #back to synapse root dir -popd #back to wherever we were \ No newline at end of file diff --git a/synapse/start.sh b/synapse/start.sh index f59a3641cc..e809fb906c 100644 --- a/synapse/start.sh +++ b/synapse/start.sh @@ -1,7 +1,5 @@ BASE_DIR=$(realpath $(dirname $0)) -pushd $BASE_DIR > /dev/null -pushd installations/consent > /dev/null +cd $BASE_DIR +cd installations/consent source env/bin/activate ./synctl start 2> /dev/null -popd > /dev/null -popd > /dev/null \ No newline at end of file diff --git a/synapse/stop.sh b/synapse/stop.sh index f55d8b50db..1c5ab2fed7 100644 --- a/synapse/stop.sh +++ b/synapse/stop.sh @@ -1,7 +1,5 @@ BASE_DIR=$(realpath $(dirname $0)) -pushd $BASE_DIR > /dev/null -pushd installations/consent > /dev/null +cd $BASE_DIR +cd installations/consent source env/bin/activate ./synctl stop -popd > /dev/null -popd > /dev/null \ No newline at end of file