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