Skip to content

Commit 84ef17b

Browse files
committed
fixed folder name in bouncer conf due to new build process.
1 parent 35779b1 commit 84ef17b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

100644100755
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
#!/usr/bin/with-contenv sh
1+
#!/bin/bash sh
22
# shellcheck shell=sh
33

44
set -e # Exit immediately if a command exits with a non-zero status.
55

66
log() {
7-
echo "[cont-init.d] $(basename $0): $*"
7+
echo "$@"
88
}
99

1010
mkdir -p /config/crowdsec/templates/
11-
echo "Deploy Crowdsec Openresty Bouncer.."
11+
log "Deploy Crowdsec Openresty Bouncer.."
1212
sed -i 's|/defaults/crowdsec|/config/crowdsec|' /etc/nginx/conf.d/crowdsec_openresty.conf
1313

1414
if [ -f /config/crowdsec/crowdsec-openresty-bouncer.conf ]; then
15-
echo "Patch crowdsec-openresty-bouncer.conf .."
15+
log "Patch crowdsec-openresty-bouncer.conf .."
1616
sed "s/=.*//g" /config/crowdsec/crowdsec-openresty-bouncer.conf > /tmp/crowdsec.conf.raw
1717
sed "s/=.*//g" /defaults/crowdsec/crowdsec-openresty-bouncer.conf > /tmp/config_new.conf.raw
1818
if grep -vf /tmp/crowdsec.conf.raw /tmp/config_new.conf.raw ; then
@@ -21,7 +21,7 @@ if [ -f /config/crowdsec/crowdsec-openresty-bouncer.conf ]; then
2121
grep -f /tmp/config_new.newvals /defaults/crowdsec/crowdsec-openresty-bouncer.conf >> /config/crowdsec/crowdsec-openresty-bouncer.conf
2222
fi
2323
else
24-
echo "Deploy new crowdsec-openresty-bouncer.conf .."
24+
log "Deploy new crowdsec-openresty-bouncer.conf .."
2525
cp /defaults/crowdsec/crowdsec-openresty-bouncer.conf /config/crowdsec/crowdsec-openresty-bouncer.conf
2626
fi
2727
#Make sure the config location is where we get the config from instead of /default/
@@ -36,4 +36,4 @@ do
3636
then
3737
cp -r "/defaults/crowdsec/templates/${file}" "/config/crowdsec/templates/"
3838
fi
39-
done
39+
done

0 commit comments

Comments
 (0)