Switch from `apt install` to `apt-get install` in deploy_linux.sh

`apt-get` has a stable command-line interface, while `apt` does not.
This commit is contained in:
Mike Salvatore 2020-12-08 18:53:19 -05:00
parent 2111d2af69
commit 5401cf2406
1 changed files with 7 additions and 7 deletions

View File

@ -110,16 +110,16 @@ if [[ ${python_cmd} == "" ]]; then
log_message "Python 3.7 command not found. Installing python 3.7." log_message "Python 3.7 command not found. Installing python 3.7."
sudo add-apt-repository ppa:deadsnakes/ppa sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update sudo apt-get update
sudo apt install -y python3.7 python3.7-dev sudo apt-get install -y python3.7 python3.7-dev
log_message "Python 3.7 is now available with command 'python3.7'." log_message "Python 3.7 is now available with command 'python3.7'."
python_cmd="python3.7" python_cmd="python3.7"
fi fi
log_message "Installing build-essential" log_message "Installing build-essential"
sudo apt install -y build-essential sudo apt-get install -y build-essential
log_message "Installing python3-distutils" log_message "Installing python3-distutils"
sudo apt install -y python3-distutils sudo apt-get install -y python3-distutils
log_message "Installing or updating pip" log_message "Installing or updating pip"
# shellcheck disable=SC2086 # shellcheck disable=SC2086
@ -137,7 +137,7 @@ requirements_island="$ISLAND_PATH/requirements.txt"
${python_cmd} -m pip install -r "${requirements_island}" --user --upgrade || handle_error ${python_cmd} -m pip install -r "${requirements_island}" --user --upgrade || handle_error
log_message "Installing monkey requirements" log_message "Installing monkey requirements"
sudo apt install -y libffi-dev upx libssl-dev libc++1 sudo apt-get install -y libffi-dev upx libssl-dev libc++1
requirements_monkey="$INFECTION_MONKEY_DIR/requirements.txt" requirements_monkey="$INFECTION_MONKEY_DIR/requirements.txt"
${python_cmd} -m pip install -r "${requirements_monkey}" --user --upgrade || handle_error ${python_cmd} -m pip install -r "${requirements_monkey}" --user --upgrade || handle_error
@ -166,13 +166,13 @@ chmod a+x "$ISLAND_BINARIES_PATH/$LINUX_64_BINARY_NAME"
# If a user haven't installed mongo manually check if we can install it with our script # If a user haven't installed mongo manually check if we can install it with our script
if ! exists mongod; then if ! exists mongod; then
log_message "Installing libcurl4" log_message "Installing libcurl4"
sudo apt install -y libcurl4 sudo apt-get install -y libcurl4
log_message "Installing MongoDB" log_message "Installing MongoDB"
"${ISLAND_PATH}"/linux/install_mongo.sh ${MONGO_PATH} || handle_error "${ISLAND_PATH}"/linux/install_mongo.sh ${MONGO_PATH} || handle_error
fi fi
log_message "Installing openssl" log_message "Installing openssl"
sudo apt install -y openssl sudo apt-get install -y openssl
# Generate SSL certificate # Generate SSL certificate
log_message "Generating certificate" log_message "Generating certificate"
@ -189,7 +189,7 @@ if ! exists npm; then
else else
wget -q -O - $node_src | sudo -E bash - wget -q -O - $node_src | sudo -E bash -
fi fi
sudo apt install -y nodejs sudo apt-get install -y nodejs
fi fi
pushd "$ISLAND_PATH/cc/ui" || handle_error pushd "$ISLAND_PATH/cc/ui" || handle_error