Skip to content

Commit

Permalink
wizard.sh: remove obsolete --yes option (crowdsecurity#3450)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmetc authored Feb 7, 2025
1 parent a9cc23e commit 037bac8
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions wizard.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 037bac8

Please sign in to comment.