File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed
init-mod-swag-crowdsec-f2b Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,11 @@ curl -so \
3232
3333mkdir -p /tmp/crowdsec
3434
35+ if ! tar -tzf /crowdsec.tar.gz >/dev/null 2>&1; then
36+ echo "**** Invalid tarball, could not download crowdsec bouncer ****"
37+ exit 1
38+ fi
39+
3540tar xf \
3641 /tmp/crowdsec.tar.gz -C \
3742 /tmp/crowdsec --strip-components=1
@@ -93,6 +98,7 @@ rm -rf \
9398if [[ $CROWDSEC_F2B_DISABLE == "true" ]]; then
9499 echo "**** Disabling fail2ban Service ****"
95100 touch /etc/services.d/fail2ban/down
101+ rm -rf /etc/logrotate.d/fail2ban
96102fi
97103
98104echo "**** Successfully configured CrowdSec nginx Bouncer ${CROWDSEC_VERSION} ****"
Original file line number Diff line number Diff line change 55if [[ ${CROWDSEC_F2B_DISABLE,,} == "true" ]]; then
66 echo "**** Disabling fail2ban Service ****"
77 s6-svc -d /run/service/svc-fail2ban
8+ rm -rf /etc/logrotate.d/fail2ban
89fi
Original file line number Diff line number Diff line change @@ -32,6 +32,11 @@ curl -so \
3232
3333mkdir -p /tmp/crowdsec
3434
35+ if ! tar -tzf /crowdsec.tar.gz >/dev/null 2>&1; then
36+ echo "**** Invalid tarball, could not download crowdsec bouncer ****"
37+ exit 1
38+ fi
39+
3540tar xf \
3641 /tmp/crowdsec.tar.gz -C \
3742 /tmp/crowdsec --strip-components=1
You can’t perform that action at this time.
0 commit comments