diff --git a/monkey/monkey_island/linux/install_mongo.sh b/monkey/monkey_island/linux/install_mongo.sh index 0aaacc490..0d720fe15 100755 --- a/monkey/monkey_island/linux/install_mongo.sh +++ b/monkey/monkey_island/linux/install_mongo.sh @@ -25,16 +25,17 @@ else fi TEMP_MONGO=$(mktemp -d) -pushd ${TEMP_MONGO} +pushd "${TEMP_MONGO}" wget ${tgz_url} -O mongodb.tgz tar -xf mongodb.tgz popd -mkdir -p ${MONGODB_DIR}/bin -mkdir -p ${MONGODB_DIR}/db -cp ${TEMP_MONGO}/mongodb-*/bin/mongod ${MONGODB_DIR}/bin/mongod -cp ${TEMP_MONGO}/mongodb-*/LICENSE-Community.txt ${MONGODB_DIR}/ -chmod a+x ${MONGODB_DIR}/bin/mongod +mkdir -p "${MONGODB_DIR}"/bin +mkdir -p "${MONGODB_DIR}"/db +cp "${TEMP_MONGO}"/mongodb-*/bin/mongod "${MONGODB_DIR}"/bin/mongod +cp "${TEMP_MONGO}"/mongodb-*/LICENSE-Community.txt "${MONGODB_DIR}"/ +chmod a+x "${MONGODB_DIR}"/bin/mongod +# shellcheck disable=SC2086 rm -r ${TEMP_MONGO} exit 0 \ No newline at end of file