mirror of https://github.com/vector-im/riot-web
stop servers on error in run script
parent
758da78659
commit
29d688543d
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
PORT=5000
|
PORT=5000
|
||||||
echo "running riot on http://localhost:$PORT..."
|
echo "running riot on http://localhost:$PORT ..."
|
||||||
BASE_DIR=$(readlink -f $(dirname $0))
|
BASE_DIR=$(readlink -f $(dirname $0))
|
||||||
cd $BASE_DIR/
|
cd $BASE_DIR/
|
||||||
pushd riot-web/webapp/ > /dev/null
|
pushd riot-web/webapp/ > /dev/null
|
||||||
|
|
18
run.sh
18
run.sh
|
@ -1,7 +1,19 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
|
||||||
|
stop_servers() {
|
||||||
|
./riot/stop.sh
|
||||||
|
./synapse/stop.sh
|
||||||
|
}
|
||||||
|
|
||||||
|
handle_error() {
|
||||||
|
EXIT_CODE=$?
|
||||||
|
stop_servers
|
||||||
|
exit $EXIT_CODE
|
||||||
|
}
|
||||||
|
|
||||||
|
trap 'handle_error' ERR
|
||||||
|
|
||||||
./synapse/start.sh
|
./synapse/start.sh
|
||||||
./riot/start.sh
|
./riot/start.sh
|
||||||
node start.js
|
node start.js
|
||||||
./riot/stop.sh
|
stop_servers
|
||||||
./synapse/stop.sh
|
|
||||||
|
|
Loading…
Reference in New Issue