File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -4,9 +4,15 @@ BLUE='\E[1;34m'
44CYAN=' \E[1;36m'
55YELLOW=' \E[1;33m'
66GREEN=' \E[1;32m'
7+ RED=' \E[1;31m'
78RESET=' \E[0m'
89
9- echo -e " ${BLUE} ❯ ${CYAN} Installing Crowdsec OpenResty Bouncer ${YELLOW}${CROWDSEC_OPENRESTY_BOUNCER_VERSION} ...${RESET} "
10+ echo -e " ${BLUE} ❯ ${CYAN} Installing Crowdsec OpenResty Bouncer ${YELLOW}${CROWDSEC_OPENRESTY_BOUNCER_VERSION:- } ...${RESET} "
11+
12+ if [ " ${CROWDSEC_OPENRESTY_BOUNCER_VERSION:- } " = " " ]; then
13+ echo -e " ${RED} ❯ ERROR: CROWDSEC_OPENRESTY_BOUNCER_VERSION environment variable is not set!${RESET} "
14+ exit 1
15+ fi
1016
1117cd /tmp
1218wget " https://github.com/crowdsecurity/cs-openresty-bouncer/releases/download/v${CROWDSEC_OPENRESTY_BOUNCER_VERSION} /crowdsec-openresty-bouncer.tgz"
@@ -17,6 +23,6 @@ cd /tmp/crowdsec
1723
1824bash ./install.sh --NGINX_CONF_DIR=/etc/nginx/conf.d --LIB_PATH=/etc/nginx/lualib --CONFIG_PATH=/defaults/crowdsec --DATA_PATH=/defaults/crowdsec --docker
1925sed -i ' s|ENABLED=.*|ENABLED=false|' /defaults/crowdsec/crowdsec-openresty-bouncer.conf
20- rm /tmp/crowdsec
26+ rm -rf /tmp/crowdsec
2127
2228echo -e " ${BLUE} ❯ ${GREEN} OpenResty plugins install completed${RESET} "
You can’t perform that action at this time.
0 commit comments