mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-07-19 09:53:02 -04:00
Merge pull request #353 from linuxserver/swag-crowdsec-better-checks
This commit is contained in:
@@ -56,8 +56,22 @@ sed -ir "s|SECRET_KEY=.*$|SECRET_KEY=${CROWDSEC_SECRET_KEY}|" "${CONFIG_PATH}cro
|
|||||||
sed -ir "s|SITE_KEY=.*$|SITE_KEY=${CROWDSEC_SITE_KEY}|" "${CONFIG_PATH}crowdsec-nginx-bouncer.conf"
|
sed -ir "s|SITE_KEY=.*$|SITE_KEY=${CROWDSEC_SITE_KEY}|" "${CONFIG_PATH}crowdsec-nginx-bouncer.conf"
|
||||||
|
|
||||||
# Sed in crowdsec include
|
# Sed in crowdsec include
|
||||||
if grep -q '#include /etc/nginx/http.d/\*.conf;' '/config/nginx/nginx.conf'; then
|
if ! grep -q '[^#]include /etc/nginx/http.d/\*.conf;' '/config/nginx/nginx.conf'; then
|
||||||
|
if grep -q '#include /etc/nginx/http.d/\*.conf;' '/config/nginx/nginx.conf'; then
|
||||||
|
# Enable http.d include
|
||||||
sed -i 's|#include /etc/nginx/http.d/\*.conf;|include /etc/nginx/http.d/\*.conf;|' /config/nginx/nginx.conf
|
sed -i 's|#include /etc/nginx/http.d/\*.conf;|include /etc/nginx/http.d/\*.conf;|' /config/nginx/nginx.conf
|
||||||
|
else
|
||||||
|
# Warn about missing http.d include
|
||||||
|
echo "
|
||||||
|
********************************************************************
|
||||||
|
* Warning: Your nginx.conf is missing required settings *
|
||||||
|
* Please add: *
|
||||||
|
* include /etc/nginx/http.d/*.conf; *
|
||||||
|
* to the http{} block and restart the container. *
|
||||||
|
* *
|
||||||
|
* The CrowdSec bouncer will not function until this is done. *
|
||||||
|
********************************************************************"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up
|
# Clean up
|
||||||
|
|||||||
Reference in New Issue
Block a user