File tree Expand file tree Collapse file tree 4 files changed +23
-63
lines changed
services.d/crowdsec_openresty_bouncer Expand file tree Collapse file tree 4 files changed +23
-63
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ ARG TARGETPLATFORM
9
9
ARG BUILD_VERSION
10
10
ARG BUILD_COMMIT
11
11
ARG BUILD_DATE
12
+ ARG CROWDSEC_OPENRESTY_BOUNCER_VERSION
12
13
13
14
ENV SUPPRESS_NO_CONFIG_WARNING=1 \
14
15
S6_FIX_ATTRS_HIDDEN=1 \
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ /bin/true
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/with-contenv bash
2
+
3
+ set -e # Exit immediately if a command exits with a non-zero status.
4
+
5
+ mkdir -p /data/crowdsec
6
+ if [ -f /data/crowdsec/crowdsec-openresty-bouncer.conf ]; then
7
+ echo "Patch crowdsec-openresty-bouncer.conf .."
8
+ sed "s/=.*//g" /data/crowdsec/crowdsec-openresty-bouncer.conf > /tmp/crowdsec.conf.raw
9
+ sed "s/=.*//g" /defaults/crowdsec/config_example.conf > /tmp/config_example.conf.raw
10
+ if grep -vf /tmp/crowdsec.conf.raw /tmp/config_example.conf.raw ; then
11
+ grep -vf /tmp/crowdsec.conf.raw /tmp/config_example.conf.raw > /tmp/config_example.newvals
12
+ cp /data/crowdsec/crowdsec-openresty-bouncer.conf /data/crowdsec/crowdsec-openresty-bouncer.conf.bak
13
+ grep -f /tmp/config_example.newvals /defaults/crowdsec/config_example.conf >> /data/crowdsec/crowdsec-openresty-bouncer.conf
14
+ fi
15
+ else
16
+ echo "Deploy new crowdsec-openresty-bouncer.conf .."
17
+ cp /defaults/crowdsec/config_example.conf /data/crowdsec/crowdsec-openresty-bouncer.conf
18
+ fi
19
+ echo "Deploy Templates .."
20
+ sed -i 's|/defaults/crowdsec/templates|/data/crowdsec/templates|' /data/crowdsec/crowdsec-openresty-bouncer.conf
21
+ cp -r /defaults/crowdsec/templates/* /data/crowdsec/templates/
You can’t perform that action at this time.
0 commit comments