wizard.sh: remove obsolete --yes option (#3450)

This commit is contained in:
mmetc 2025-02-07 12:14:13 +01:00 committed by GitHub
parent a9cc23e446
commit 037bac86ad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -254,26 +254,22 @@ install_collection() {
fi
done
local YES=""
if [[ ${SILENT} == "false" ]]; then
COLLECTION_TO_INSTALL=($(whiptail --separate-output --ok-button Continue --title "Crowdsec collections" --checklist "Available collections in crowdsec, try to pick one that fits your profile. Collections contains parsers and scenarios to protect your system." 20 120 10 "${HMENU[@]}" 3>&1 1>&2 2>&3))
if [ $? -eq 1 ]; then
log_err "user bailed out at collection selection"
exit 1;
fi;
else
YES="--yes"
fi;
for collection in "${COLLECTION_TO_INSTALL[@]}"; do
log_info "Installing collection '${collection}'"
# shellcheck disable=SC2248
${CSCLI_BIN_INSTALLED} collections install "${collection}" --error ${YES}
${CSCLI_BIN_INSTALLED} collections install "${collection}" --error
done
# shellcheck disable=SC2248
${CSCLI_BIN_INSTALLED} parsers install "crowdsecurity/whitelists" --error ${YES}
${CSCLI_BIN_INSTALLED} parsers install "crowdsecurity/whitelists" --error
if [[ ${SILENT} == "false" ]]; then
whiptail --msgbox "Out of safety, I installed a parser called 'crowdsecurity/whitelists'. This one will prevent private IP addresses from being banned, feel free to remove it any time." 20 50
fi