Empire/setup/reset.sh

39 lines
509 B
Bash
Raw Normal View History

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
IFS='/' read -a array <<< pwd
if [[ "$(pwd)" != *setup ]]
then
cd ./setup
fi
2015-08-05 18:36:39 +00:00
# reset the database
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
if [ -e empire.debug ]
then
rm empire.debug
fi
2015-08-05 18:36:39 +00:00
# remove the download folders
if [ -d ./downloads/ ]
then
rm -rf ./downloads/
fi
2015-08-05 18:36:39 +00:00
# start up Empire
2016-09-23 18:04:35 +00:00
# ./empire --debug 2
./empire