2018-07-27 21:08:14 +08:00
|
|
|
#!/bin/bash
|
2018-07-27 22:22:17 +08:00
|
|
|
PORT=5000
|
2018-07-27 21:04:04 +08:00
|
|
|
BASE_DIR=$(readlink -f $(dirname $0))
|
2018-07-31 17:41:01 +08:00
|
|
|
PIDFILE=riot.pid
|
|
|
|
CONFIG_BACKUP=config.e2etests_backup.json
|
|
|
|
|
2018-07-27 20:10:19 +08:00
|
|
|
cd $BASE_DIR/
|
2018-07-31 17:41:01 +08:00
|
|
|
|
|
|
|
if [ -f $PIDFILE ]; then
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "running riot on http://localhost:$PORT ..."
|
2018-07-27 19:29:59 +08:00
|
|
|
pushd riot-web/webapp/ > /dev/null
|
2018-07-28 01:27:53 +08:00
|
|
|
|
|
|
|
# backup config file before we copy template
|
|
|
|
if [ -f config.json ]; then
|
|
|
|
mv config.json $CONFIG_BACKUP
|
|
|
|
fi
|
|
|
|
cp $BASE_DIR/config-template/config.json .
|
|
|
|
|
2018-07-27 19:43:12 +08:00
|
|
|
python -m SimpleHTTPServer $PORT > /dev/null 2>&1 &
|
2018-07-18 23:52:51 +08:00
|
|
|
PID=$!
|
2018-07-27 19:29:59 +08:00
|
|
|
popd > /dev/null
|
2018-07-31 17:41:01 +08:00
|
|
|
echo $PID > $PIDFILE
|