apply config file when starting riot, not installing, so we can support riots that were built by another process

This commit is contained in:
Bruno Windels 2018-07-27 19:27:53 +02:00
parent 31fcf08fec
commit e50420dd1b
3 changed files with 18 additions and 2 deletions

View file

@ -1,9 +1,19 @@
#!/bin/bash
BASE_DIR=$(readlink -f $(dirname $0))
cd $BASE_DIR
PIDFILE=riot.pid
CONFIG_BACKUP=config.e2etests_backup.json
cd $BASE_DIR
if [ -f $PIDFILE ]; then
echo "stopping riot server ..."
kill $(cat $PIDFILE)
rm $PIDFILE
# revert config file
cd riot-web/webapp
rm config.json
if [ -f $CONFIG_BACKUP ]; then
mv $CONFIG_BACKUP config.json
fi
fi