2018-07-27 13:08:14 +00:00
|
|
|
#!/bin/bash
|
2018-09-25 17:45:08 +00:00
|
|
|
set -e
|
|
|
|
|
|
|
|
BASE_DIR=$(cd $(dirname $0) && pwd)
|
2018-07-18 15:52:51 +00:00
|
|
|
PIDFILE=riot.pid
|
2018-07-27 17:27:53 +00:00
|
|
|
CONFIG_BACKUP=config.e2etests_backup.json
|
|
|
|
|
|
|
|
cd $BASE_DIR
|
|
|
|
|
2018-07-27 16:43:40 +00:00
|
|
|
if [ -f $PIDFILE ]; then
|
2018-08-14 10:53:16 +00:00
|
|
|
echo "stopping riot server ..."
|
|
|
|
PID=$(cat $PIDFILE)
|
|
|
|
rm $PIDFILE
|
|
|
|
kill $PID
|
2018-07-27 17:27:53 +00:00
|
|
|
|
2018-08-14 10:53:16 +00:00
|
|
|
# revert config file
|
|
|
|
cd riot-web/webapp
|
|
|
|
rm config.json
|
|
|
|
if [ -f $CONFIG_BACKUP ]; then
|
|
|
|
mv $CONFIG_BACKUP config.json
|
|
|
|
fi
|
2018-07-27 16:43:40 +00:00
|
|
|
fi
|