File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 1- #! /usr/ bin/with-contenv sh
1+ #! /bin/bash sh
22# shellcheck shell=sh
33
44set -e # Exit immediately if a command exits with a non-zero status.
55
66log () {
7- echo " [cont-init.d] $( basename $0 ) : $* "
7+ echo " $@ "
88}
99
1010mkdir -p /config/crowdsec/templates/
11- echo " Deploy Crowdsec Openresty Bouncer.."
11+ log " Deploy Crowdsec Openresty Bouncer.."
1212sed -i ' s|/defaults/crowdsec|/config/crowdsec|' /etc/nginx/conf.d/crowdsec_openresty.conf
1313
1414if [ -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
2323else
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
2626fi
2727# Make sure the config location is where we get the config from instead of /default/
3636 then
3737 cp -r " /defaults/crowdsec/templates/${file} " " /config/crowdsec/templates/"
3838 fi
39- done
39+ done
You can’t perform that action at this time.
0 commit comments