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'
4
4
CYAN=' \E[1;36m'
5
5
YELLOW=' \E[1;33m'
6
6
GREEN=' \E[1;32m'
7
+ RED=' \E[1;31m'
7
8
RESET=' \E[0m'
8
9
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
10
16
11
17
cd /tmp
12
18
wget " 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
17
23
18
24
bash ./install.sh --NGINX_CONF_DIR=/etc/nginx/conf.d --LIB_PATH=/etc/nginx/lualib --CONFIG_PATH=/defaults/crowdsec --DATA_PATH=/defaults/crowdsec --docker
19
25
sed -i ' s|ENABLED=.*|ENABLED=false|' /defaults/crowdsec/crowdsec-openresty-bouncer.conf
20
- rm /tmp/crowdsec
26
+ rm -rf /tmp/crowdsec
21
27
22
28
echo -e " ${BLUE} ❯ ${GREEN} OpenResty plugins install completed${RESET} "
You can’t perform that action at this time.
0 commit comments