2021-02-08 22:09:42 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
2021-04-13 02:29:40 +08:00
|
|
|
PYTHON_CMD="$APPDIR"/opt/python3.7/bin/python3.7
|
|
|
|
DOT_MONKEY="$HOME"/.monkey_island/
|
2021-02-11 20:27:56 +08:00
|
|
|
|
2021-04-13 02:29:40 +08:00
|
|
|
# shellcheck disable=SC2174
|
|
|
|
mkdir --mode=0700 --parents "$DOT_MONKEY"
|
2021-02-08 22:09:42 +08:00
|
|
|
|
2021-04-13 02:29:40 +08:00
|
|
|
DB_DIR="$DOT_MONKEY"/db
|
|
|
|
mkdir --parents "$DB_DIR"
|
2021-02-08 22:09:42 +08:00
|
|
|
|
2021-04-13 02:29:40 +08:00
|
|
|
cd "$APPDIR"/usr/src || exit 1
|
|
|
|
./monkey_island/bin/mongodb/bin/mongod --dbpath "$DB_DIR" &
|
2021-05-13 01:12:40 +08:00
|
|
|
${PYTHON_CMD} ./monkey_island.py --server-config "$DOT_MONKEY"/server_config.json
|