This commit is contained in:
hl committed 2026-01-10 09:37:12 +08:00
1 parent ecbc67e5cd
commit f1015ef367
2 files changed
+16 -6

No files matched your search

+7 -2
View File
@@ -10,7 +10,7 @@ AWD=$(dirname "$SCRIPT")
main(){
echo "deb https://packagecloud.io/crowdsec/crowdsec/debian/ $OS_CODE main" | \
tee /etc/apt/sources.list.d/crowdsec_crowdsec.list
curl -fsSL "https://packagecloud.io/crowdsec/crowdsec/gpgkey" | \
curl -fsSL "https://packagecloud.io/crowdsec/crowdsec/gpgkey" $SET_PROXY | \
gpg --dearmor | tee /etc/apt/trusted.gpg.d/crowdsec_crowdsec-archive-keyring.gpg > /dev/null
echo "crowdsec crowdsec-firewall-bouncer-iptables" | $AWD/install.sh
@@ -45,14 +45,19 @@ usage(){
echo "Usage: $0 [OPTIONS]";
echo "OPTIONS:";
echo " -s skip setup";
echo " -x <PROXY> Proxy [protocol://]host[:port]";
}
DO_SETUP=true;
while getopts ":s" OPT; do
SET_PROXY=;
while getopts ":sx:" OPT; do
case $OPT in
s)
DO_SETUP=false;
;;
x)
SET_PROXY="-x $OPTARG";
;;
?)
echo "Invalid Option: -$OPTARG";
usage;