Skip to content

Commit cc15540

Browse files
authored
Merge pull request #735 from linuxserver/swag-crowdsec-debug
2 parents f6429b2 + d89986c commit cc15540

File tree

1 file changed

+8
-2
lines changed
  • root/etc/s6-overlay/s6-rc.d/init-mod-swag-crowdsec

1 file changed

+8
-2
lines changed

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ CONFIG_PATH="/config/crowdsec/"
55
LIB_PATH="/usr/local/lua/crowdsec/"
66
DATA_PATH="/var/lib/crowdsec/lua/"
77

8+
if [[ ${DOCKER_MODS_DEBUG,,} = "true" ]]; then
9+
CURL_NOISE_LEVEL="-v"
10+
else
11+
CURL_NOISE_LEVEL="--silent"
12+
fi
13+
814
echo "**** Configuring CrowdSec nginx Bouncer ****"
915

1016
# If API keys are missing, disable mod and exit
@@ -23,10 +29,10 @@ echo "\
2329

2430
# Download nginx bouncer
2531
if [[ -z ${CROWDSEC_VERSION+x} ]]; then \
26-
CROWDSEC_VERSION=$(curl -sX GET "https://api.github.com/repos/crowdsecurity/cs-nginx-bouncer/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]');
32+
CROWDSEC_VERSION=$(curl -s "https://api.github.com/repos/crowdsecurity/cs-nginx-bouncer/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]');
2733
fi
2834

29-
curl -so \
35+
curl "${CURL_NOISE_LEVEL}" -Lo \
3036
/tmp/crowdsec.tar.gz -L \
3137
"https://github.com/crowdsecurity/cs-nginx-bouncer/releases/download/${CROWDSEC_VERSION}/crowdsec-nginx-bouncer.tgz"
3238

0 commit comments

Comments
 (0)