only run riot static server if no riot url has been provided

This commit is contained in:
Bruno Windels 2019-10-09 16:59:00 +02:00
parent ae38e0b357
commit cad71913e9
2 changed files with 33 additions and 3 deletions

View file

@ -1,9 +1,13 @@
#!/bin/bash
set -e
has_custom_riot=$(node has_custom_riot.js $@)
stop_servers() {
./riot/stop.sh
./synapse/stop.sh
if [ $has_custom_riot -ne "1" ]; then
./riot/stop.sh
fi
./synapse/stop.sh
}
handle_error() {
@ -15,6 +19,8 @@ handle_error() {
trap 'handle_error' ERR
./synapse/start.sh
./riot/start.sh
if [ $has_custom_riot -ne "1" ]; then
./riot/start.sh
fi
node start.js $@
stop_servers