Skip to content

Commit 96b2404

Browse files
authored
Merge pull request #581 from linuxserver/swag-crowdsec-f2bupdate
2 parents 3892ce0 + 5c92150 commit 96b2404

File tree

3 files changed

+12
-0
lines changed
  • root/etc
    • cont-init.d
    • s6-overlay/s6-rc.d
      • init-mod-swag-crowdsec-f2b
      • init-mod-swag-crowdsec

3 files changed

+12
-0
lines changed

root/etc/cont-init.d/98-crowdsec

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ curl -so \
3232

3333
mkdir -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+
3540
tar xf \
3641
/tmp/crowdsec.tar.gz -C \
3742
/tmp/crowdsec --strip-components=1
@@ -93,6 +98,7 @@ rm -rf \
9398
if [[ $CROWDSEC_F2B_DISABLE == "true" ]]; then
9499
echo "**** Disabling fail2ban Service ****"
95100
touch /etc/services.d/fail2ban/down
101+
rm -rf /etc/logrotate.d/fail2ban
96102
fi
97103

98104
echo "**** Successfully configured CrowdSec nginx Bouncer ${CROWDSEC_VERSION} ****"

root/etc/s6-overlay/s6-rc.d/init-mod-swag-crowdsec-f2b/run

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@
55
if [[ ${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
89
fi

root/etc/s6-overlay/s6-rc.d/init-mod-swag-crowdsec/run

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ curl -so \
3232

3333
mkdir -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+
3540
tar xf \
3641
/tmp/crowdsec.tar.gz -C \
3742
/tmp/crowdsec --strip-components=1

0 commit comments

Comments
 (0)