build: create appimage-comaptible server_config.json on start

This commit is contained in:
Mike Salvatore 2021-03-25 08:45:08 -04:00
parent 412aa2ba35
commit b0af8b1b97
1 changed files with 8 additions and 0 deletions

View File

@ -8,6 +8,13 @@ configure_default_logging() {
fi fi
} }
configure_default_server() {
if [ ! -f $DOT_MONKEY/server_config.json ]; then
cp $APPDIR/usr/src/monkey_island/cc/server_config.json.standard $DOT_MONKEY/server_config.json
fi
}
# Detecting command that calls python 3.7 # Detecting command that calls python 3.7
python_cmd="" python_cmd=""
@ -27,6 +34,7 @@ DB_DIR=$DOT_MONKEY/db
mkdir -p $DB_DIR mkdir -p $DB_DIR
configure_default_logging configure_default_logging
configure_default_server
cd $APPDIR/usr/src cd $APPDIR/usr/src
./monkey_island/bin/mongodb/bin/mongod --dbpath $DB_DIR & ./monkey_island/bin/mongodb/bin/mongod --dbpath $DB_DIR &