Merge pull request #355 from linuxserver/swag-crowdsec-disable-f2b

This commit is contained in:
Roxedus 2022-03-27 15:34:20 +02:00 committed by GitHub
commit 0e5f264c77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -23,6 +23,7 @@ Set the following environment variables on your SWAG container.
| `CROWDSEC_SITE_KEY` | **Optional** | reCAPTCHA v2 Site Key |
| `CROWDSEC_SECRET_KEY` | **Optional** | reCAPTCHA v2 Secret Key |
| `CROWDSEC_VERSION` | **Optional** | Specify a version of the bouncer to install instead of using the latest release, for example `v1.0.0`. Must be a valid [release tag](https://github.com/crowdsecurity/cs-nginx-bouncer/tags). **Does not support versions older than v1.0.0**.
| `CROWDSEC_F2B_DISABLE` | **Optional** | Set to `true` to disable swag's built-in fail2ban service if you don't need it |
| | | |
The variables need to remain in place while you are using the mod. If you remove **required** variables the bouncer will be disabled the next time you recreate the container, if you remove **optional** variables the associated features will be disabled the next time you recreate the container.

View File

@ -79,4 +79,10 @@ rm -rf \
/tmp/crowdsec \
/tmp/crowdsec.tar.gz
# Disable f2b if requested
if [[ $CROWDSEC_F2B_DISABLE == "true" ]]; then
echo "**** Disabling fail2ban Service ****"
touch /etc/services.d/fail2ban/down
fi
echo "**** Successfully configured CrowdSec nginx Bouncer ${CROWDSEC_VERSION} ****"