forked from p15670423/monkey
build: Address shellcheck warnings in run_appimage.sh
This commit is contained in:
parent
9d8fc489c9
commit
a58f310e61
|
@ -1,31 +1,32 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
PYTHON_CMD="$APPDIR/opt/python3.7/bin/python3.7"
|
PYTHON_CMD="$APPDIR"/opt/python3.7/bin/python3.7
|
||||||
DOT_MONKEY=$HOME/.monkey_island/
|
DOT_MONKEY="$HOME"/.monkey_island/
|
||||||
|
|
||||||
configure_default_logging() {
|
configure_default_logging() {
|
||||||
if [ ! -f $DOT_MONKEY/island_logger_config.json ]; then
|
if [ ! -f "$DOT_MONKEY"/island_logger_config.json ]; then
|
||||||
cp $APPDIR/usr/src/island_logger_config.json $DOT_MONKEY
|
cp "$APPDIR"/usr/src/island_logger_config.json "$DOT_MONKEY"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
configure_default_server() {
|
configure_default_server() {
|
||||||
if [ ! -f $DOT_MONKEY/server_config.json ]; then
|
if [ ! -f "$DOT_MONKEY"/server_config.json ]; then
|
||||||
cp $APPDIR/usr/src/monkey_island/cc/server_config.json.standard $DOT_MONKEY/server_config.json
|
cp "$APPDIR"/usr/src/monkey_island/cc/server_config.json.standard "$DOT_MONKEY"/server_config.json
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
mkdir --mode=0700 --parents $DOT_MONKEY
|
# shellcheck disable=SC2174
|
||||||
|
mkdir --mode=0700 --parents "$DOT_MONKEY"
|
||||||
|
|
||||||
DB_DIR=$DOT_MONKEY/db
|
DB_DIR="$DOT_MONKEY"/db
|
||||||
mkdir -p $DB_DIR
|
mkdir --parents "$DB_DIR"
|
||||||
|
|
||||||
configure_default_logging
|
configure_default_logging
|
||||||
configure_default_server
|
configure_default_server
|
||||||
|
|
||||||
cd $APPDIR/usr/src
|
cd "$APPDIR"/usr/src || exit 1
|
||||||
./monkey_island/bin/mongodb/bin/mongod --dbpath $DB_DIR &
|
./monkey_island/bin/mongodb/bin/mongod --dbpath "$DB_DIR" &
|
||||||
${PYTHON_CMD} ./monkey_island.py --server-config $DOT_MONKEY/server_config.json --logger-config $DOT_MONKEY/island_logger_config.json
|
${PYTHON_CMD} ./monkey_island.py --server-config "$DOT_MONKEY"/server_config.json --logger-config "$DOT_MONKEY"/island_logger_config.json
|
||||||
|
|
Loading…
Reference in New Issue