Skip to content

Commit b80a182

Browse files
committed
make sure both /defaults/crowdsec locations are changed to /config/crowdsec
1 parent a638e49 commit b80a182

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

rootfs/etc/cont-init.d/99_crowdsec-openresty-bouncer.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ log() {
66
echo "[cont-init.d] $(basename $0): $*"
77
}
88

9-
mkdir -p /config/crowdsec
9+
mkdir -p /config/crowdsec/templates/
1010
echo "Deploy Crowdsec Openresty Bouncer manually.."
1111
if [ -f /config/crowdsec/crowdsec-openresty-bouncer.conf ]; then
1212
echo "Patch crowdsec-openresty-bouncer.conf .."
@@ -21,6 +21,7 @@ else
2121
echo "Deploy new crowdsec-openresty-bouncer.conf .."
2222
cp /defaults/crowdsec/config_example.conf /config/crowdsec/crowdsec-openresty-bouncer.conf
2323
fi
24+
#Make sure the config location is where we get the config from instead of /default/
25+
sed -i 's|/defaults/crowdsec|/config/crowdsec|' /config/crowdsec/crowdsec-openresty-bouncer.conf
2426
echo "Deploy Templates .."
25-
sed -i 's|/defaults/crowdsec/templates|/config/crowdsec/templates|' /config/crowdsec/crowdsec-openresty-bouncer.conf
2627
cp -r /defaults/crowdsec/templates/* /config/crowdsec/templates/

0 commit comments

Comments
 (0)