only allow one riot server instance simultaneously

pull/21833/head
Bruno Windels 2018-07-31 11:41:01 +02:00
parent 5129bb57b6
commit 31fcf08fec
1 changed files with 10 additions and 2 deletions

View File

@ -1,10 +1,18 @@
#!/bin/bash
PORT=5000
echo "running riot on http://localhost:$PORT ..."
BASE_DIR=$(readlink -f $(dirname $0))
PIDFILE=riot.pid
CONFIG_BACKUP=config.e2etests_backup.json
cd $BASE_DIR/
if [ -f $PIDFILE ]; then
exit
fi
echo "running riot on http://localhost:$PORT ..."
pushd riot-web/webapp/ > /dev/null
python -m SimpleHTTPServer $PORT > /dev/null 2>&1 &
PID=$!
popd > /dev/null
echo $PID > riot.pid
echo $PID > $PIDFILE