From 31fcf08fece786f7fc7c3fd96770037c0926dc2e Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 31 Jul 2018 11:41:01 +0200 Subject: [PATCH] only allow one riot server instance simultaneously --- riot/start.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/riot/start.sh b/riot/start.sh index 143e5d9f8f..2c76747e46 100755 --- a/riot/start.sh +++ b/riot/start.sh @@ -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