element-web/riot/stop.sh

21 lines
357 B
Bash
Raw Normal View History

#!/bin/bash
BASE_DIR=$(readlink -f $(dirname $0))
PIDFILE=riot.pid
CONFIG_BACKUP=config.e2etests_backup.json
cd $BASE_DIR
if [ -f $PIDFILE ]; then
echo "stopping riot server ..."
2018-07-31 10:54:39 +00:00
PID=$(cat $PIDFILE)
rm $PIDFILE
2018-07-31 10:54:39 +00:00
kill $PID
# revert config file
cd riot-web/webapp
rm config.json
if [ -f $CONFIG_BACKUP ]; then
mv $CONFIG_BACKUP config.json
fi
fi