mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-07-18 08:48:27 -04:00
Remove f2b logrotate if service is disabled. Sanity check tarball.
This commit is contained in:
@@ -32,6 +32,11 @@ curl -so \
|
|||||||
|
|
||||||
mkdir -p /tmp/crowdsec
|
mkdir -p /tmp/crowdsec
|
||||||
|
|
||||||
|
if ! tar -tzf /crowdsec.tar.gz >/dev/null 2>&1; then
|
||||||
|
echo "**** Invalid tarball, could not download crowdsec bouncer ****"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
tar xf \
|
tar xf \
|
||||||
/tmp/crowdsec.tar.gz -C \
|
/tmp/crowdsec.tar.gz -C \
|
||||||
/tmp/crowdsec --strip-components=1
|
/tmp/crowdsec --strip-components=1
|
||||||
@@ -93,6 +98,7 @@ rm -rf \
|
|||||||
if [[ $CROWDSEC_F2B_DISABLE == "true" ]]; then
|
if [[ $CROWDSEC_F2B_DISABLE == "true" ]]; then
|
||||||
echo "**** Disabling fail2ban Service ****"
|
echo "**** Disabling fail2ban Service ****"
|
||||||
touch /etc/services.d/fail2ban/down
|
touch /etc/services.d/fail2ban/down
|
||||||
|
rm -rf /etc/logrotate.d/fail2ban
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "**** Successfully configured CrowdSec nginx Bouncer ${CROWDSEC_VERSION} ****"
|
echo "**** Successfully configured CrowdSec nginx Bouncer ${CROWDSEC_VERSION} ****"
|
||||||
|
|||||||
@@ -5,4 +5,5 @@
|
|||||||
if [[ ${CROWDSEC_F2B_DISABLE,,} == "true" ]]; then
|
if [[ ${CROWDSEC_F2B_DISABLE,,} == "true" ]]; then
|
||||||
echo "**** Disabling fail2ban Service ****"
|
echo "**** Disabling fail2ban Service ****"
|
||||||
s6-svc -d /run/service/svc-fail2ban
|
s6-svc -d /run/service/svc-fail2ban
|
||||||
|
rm -rf /etc/logrotate.d/fail2ban
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -32,6 +32,11 @@ curl -so \
|
|||||||
|
|
||||||
mkdir -p /tmp/crowdsec
|
mkdir -p /tmp/crowdsec
|
||||||
|
|
||||||
|
if ! tar -tzf /crowdsec.tar.gz >/dev/null 2>&1; then
|
||||||
|
echo "**** Invalid tarball, could not download crowdsec bouncer ****"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
tar xf \
|
tar xf \
|
||||||
/tmp/crowdsec.tar.gz -C \
|
/tmp/crowdsec.tar.gz -C \
|
||||||
/tmp/crowdsec --strip-components=1
|
/tmp/crowdsec --strip-components=1
|
||||||
|
|||||||
Reference in New Issue
Block a user