Fix sed error.

This commit is contained in:
TheSpad 2022-04-03 11:07:44 +01:00
parent 0e5f264c77
commit db8793ca52

View File

@ -52,8 +52,8 @@ cp -r /tmp/crowdsec/lua-mod/lib/* ${LIB_PATH}
cp /tmp/crowdsec/nginx/crowdsec_nginx.conf /etc/nginx/http.d
# Sed in ReCaptcha keys
sed -ir "s|SECRET_KEY=.*$|SECRET_KEY=${CROWDSEC_SECRET_KEY}|" "${CONFIG_PATH}crowdsec-nginx-bouncer.conf"
sed -ir "s|SITE_KEY=.*$|SITE_KEY=${CROWDSEC_SITE_KEY}|" "${CONFIG_PATH}crowdsec-nginx-bouncer.conf"
sed -i -r "s|SECRET_KEY=.*$|SECRET_KEY=${CROWDSEC_SECRET_KEY}|" "${CONFIG_PATH}crowdsec-nginx-bouncer.conf"
sed -i -r "s|SITE_KEY=.*$|SITE_KEY=${CROWDSEC_SITE_KEY}|" "${CONFIG_PATH}crowdsec-nginx-bouncer.conf"
# Sed in crowdsec include
if ! grep -q '[^#]include /etc/nginx/http.d/\*.conf;' '/config/nginx/nginx.conf' && ! grep -q '[^#]include /etc/nginx/conf.d/\*.conf;' '/config/nginx/nginx.conf'; then