update
This commit is contained in:
2 files changed
+16
-6
No files matched your search
+7
-2
@@ -10,7 +10,7 @@ AWD=$(dirname "$SCRIPT")
|
|||||||
main(){
|
main(){
|
||||||
echo "deb https://packagecloud.io/crowdsec/crowdsec/debian/ $OS_CODE main" | \
|
echo "deb https://packagecloud.io/crowdsec/crowdsec/debian/ $OS_CODE main" | \
|
||||||
tee /etc/apt/sources.list.d/crowdsec_crowdsec.list
|
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
|
gpg --dearmor | tee /etc/apt/trusted.gpg.d/crowdsec_crowdsec-archive-keyring.gpg > /dev/null
|
||||||
|
|
||||||
echo "crowdsec crowdsec-firewall-bouncer-iptables" | $AWD/install.sh
|
echo "crowdsec crowdsec-firewall-bouncer-iptables" | $AWD/install.sh
|
||||||
@@ -45,14 +45,19 @@ usage(){
|
|||||||
echo "Usage: $0 [OPTIONS]";
|
echo "Usage: $0 [OPTIONS]";
|
||||||
echo "OPTIONS:";
|
echo "OPTIONS:";
|
||||||
echo " -s skip setup";
|
echo " -s skip setup";
|
||||||
|
echo " -x <PROXY> Proxy [protocol://]host[:port]";
|
||||||
}
|
}
|
||||||
|
|
||||||
DO_SETUP=true;
|
DO_SETUP=true;
|
||||||
while getopts ":s" OPT; do
|
SET_PROXY=;
|
||||||
|
while getopts ":sx:" OPT; do
|
||||||
case $OPT in
|
case $OPT in
|
||||||
s)
|
s)
|
||||||
DO_SETUP=false;
|
DO_SETUP=false;
|
||||||
;;
|
;;
|
||||||
|
x)
|
||||||
|
SET_PROXY="-x $OPTARG";
|
||||||
|
;;
|
||||||
?)
|
?)
|
||||||
echo "Invalid Option: -$OPTARG";
|
echo "Invalid Option: -$OPTARG";
|
||||||
usage;
|
usage;
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ Components: stable
|
|||||||
Signed-By: /etc/apt/trusted.gpg.d/docker.gpg
|
Signed-By: /etc/apt/trusted.gpg.d/docker.gpg
|
||||||
Architectures: $OS_ARCH
|
Architectures: $OS_ARCH
|
||||||
" | tee /etc/apt/sources.list.d/docker.sources
|
" | tee /etc/apt/sources.list.d/docker.sources
|
||||||
curl -fsSL $DOCKER_PGP | \
|
curl -fsSL $DOCKER_PGP $SET_PROXY | \
|
||||||
gpg --dearmor | tee /etc/apt/trusted.gpg.d/docker.gpg > /dev/null
|
gpg --dearmor | tee /etc/apt/trusted.gpg.d/docker.gpg > /dev/null
|
||||||
|
|
||||||
#For docker-ctop
|
#For docker-ctop
|
||||||
@@ -91,7 +91,7 @@ Components: main
|
|||||||
Signed-By: /etc/apt/trusted.gpg.d/azlux-archive-keyring.gpg
|
Signed-By: /etc/apt/trusted.gpg.d/azlux-archive-keyring.gpg
|
||||||
Architectures: $OS_ARCH
|
Architectures: $OS_ARCH
|
||||||
" | tee /etc/apt/sources.list.d/azlux.sources
|
" | tee /etc/apt/sources.list.d/azlux.sources
|
||||||
curl -fsSL "https://azlux.fr/repo.gpg.key" | \
|
curl -fsSL "https://azlux.fr/repo.gpg.key" $SET_PROXY | \
|
||||||
gpg --dearmor | tee /etc/apt/trusted.gpg.d/azlux-archive-keyring.gpg > /dev/null
|
gpg --dearmor | tee /etc/apt/trusted.gpg.d/azlux-archive-keyring.gpg > /dev/null
|
||||||
|
|
||||||
echo -e "Types: deb
|
echo -e "Types: deb
|
||||||
@@ -101,7 +101,7 @@ Components: main
|
|||||||
Signed-By: /etc/apt/trusted.gpg.d/crowdsec-archive-keyring.gpg
|
Signed-By: /etc/apt/trusted.gpg.d/crowdsec-archive-keyring.gpg
|
||||||
Architectures: $OS_ARCH
|
Architectures: $OS_ARCH
|
||||||
" | tee /etc/apt/sources.list.d/crowdsec.sources
|
" | tee /etc/apt/sources.list.d/crowdsec.sources
|
||||||
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-archive-keyring.gpg > /dev/null
|
gpg --dearmor | tee /etc/apt/trusted.gpg.d/crowdsec-archive-keyring.gpg > /dev/null
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@@ -122,12 +122,14 @@ usage(){
|
|||||||
echo " * official"
|
echo " * official"
|
||||||
echo " 1 cernet (default)"
|
echo " 1 cernet (default)"
|
||||||
echo " 2 aliyun"
|
echo " 2 aliyun"
|
||||||
|
echo " -x <PROXY> Proxy [protocol://]host[:port]";
|
||||||
}
|
}
|
||||||
|
|
||||||
PKG_BASE="$AWD/packages-base"
|
PKG_BASE="$AWD/packages-base"
|
||||||
DO_INSTALL=true;
|
DO_INSTALL=true;
|
||||||
MIRROR_SOURCE=1;
|
MIRROR_SOURCE=1;
|
||||||
while getopts ":f:sm:" OPT; do
|
SET_PROXY=;
|
||||||
|
while getopts ":f:sm:x:" OPT; do
|
||||||
case $OPT in
|
case $OPT in
|
||||||
f)
|
f)
|
||||||
PKG_BASE=$OPTARG;
|
PKG_BASE=$OPTARG;
|
||||||
@@ -138,6 +140,9 @@ while getopts ":f:sm:" OPT; do
|
|||||||
m)
|
m)
|
||||||
MIRROR_SOURCE=$OPTARG;
|
MIRROR_SOURCE=$OPTARG;
|
||||||
;;
|
;;
|
||||||
|
x)
|
||||||
|
SET_PROXY="-x $OPTARG";
|
||||||
|
;;
|
||||||
?)
|
?)
|
||||||
echo "Invalid Option: -$OPTARG";
|
echo "Invalid Option: -$OPTARG";
|
||||||
usage;
|
usage;
|
||||||
|
|||||||
Reference in new issue
Block a user