2015-08-05 18:36:39 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2016-09-23 18:04:35 +00:00
|
|
|
if [[ $EUID -ne 0 ]]; then
|
|
|
|
echo " [!]This script must be run as root" 1>&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2015-08-20 18:35:42 +00:00
|
|
|
IFS='/' read -a array <<< pwd
|
|
|
|
|
|
|
|
if [[ "$(pwd)" != *setup ]]
|
|
|
|
then
|
|
|
|
cd ./setup
|
|
|
|
fi
|
|
|
|
|
2015-08-05 18:36:39 +00:00
|
|
|
# reset the database
|
2016-04-01 21:06:21 +00:00
|
|
|
if [ -e ../data/empire.db ]
|
|
|
|
then
|
|
|
|
rm ../data/empire.db
|
|
|
|
fi
|
|
|
|
|
2015-08-05 18:36:39 +00:00
|
|
|
./setup_database.py
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
# remove the debug file if it exists
|
2016-04-01 21:06:21 +00:00
|
|
|
if [ -e empire.debug ]
|
|
|
|
then
|
|
|
|
rm empire.debug
|
|
|
|
fi
|
2015-08-05 18:36:39 +00:00
|
|
|
|
|
|
|
# remove the download folders
|
2016-04-01 21:06:21 +00:00
|
|
|
if [ -d ./downloads/ ]
|
|
|
|
then
|
|
|
|
rm -rf ./downloads/
|
|
|
|
fi
|
2015-08-05 18:36:39 +00:00
|
|
|
|
2015-08-20 18:35:42 +00:00
|
|
|
# start up Empire
|
2016-09-23 18:04:35 +00:00
|
|
|
# ./empire --debug 2
|
2015-08-20 18:35:42 +00:00
|
|
|
./empire
|