2018-07-27 16:08:14 +03:00
|
|
|
#!/bin/bash
|
2018-09-25 20:45:08 +03:00
|
|
|
set -e
|
|
|
|
|
|
|
|
BASE_DIR=$(cd $(dirname $0) && pwd)
|
2020-12-03 16:56:27 +03:00
|
|
|
PIDFILE=element.pid
|
2018-07-27 20:27:53 +03:00
|
|
|
CONFIG_BACKUP=config.e2etests_backup.json
|
|
|
|
|
|
|
|
cd $BASE_DIR
|
|
|
|
|
2018-07-27 19:43:40 +03:00
|
|
|
if [ -f $PIDFILE ]; then
|
2020-12-03 16:56:27 +03:00
|
|
|
echo "Stopping Element server ..."
|
2018-08-14 13:53:16 +03:00
|
|
|
PID=$(cat $PIDFILE)
|
|
|
|
rm $PIDFILE
|
|
|
|
kill $PID
|
2018-07-27 20:27:53 +03:00
|
|
|
|
2018-08-14 13:53:16 +03:00
|
|
|
# revert config file
|
2020-12-03 16:56:27 +03:00
|
|
|
cd element-web/webapp
|
2018-08-14 13:53:16 +03:00
|
|
|
rm config.json
|
|
|
|
if [ -f $CONFIG_BACKUP ]; then
|
|
|
|
mv $CONFIG_BACKUP config.json
|
|
|
|
fi
|
2018-07-27 19:43:40 +03:00
|
|
|
fi
|