Skip to content

Commit 9c371de

Browse files
committed
Fix install script envsubst usage
1 parent 8b6db45 commit 9c371de

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ gen_config_file() {
8080
fi
8181
CROWDSEC_LAPI_URL="http://127.0.0.1:${LAPI_DEFAULT_PORT}"
8282
fi
83-
API_KEY=${API_KEY} CROWDSEC_LAPI_URL="${CROWDSEC_LAPI_URL}" envsubst < ./config/config_example.conf > "${CONFIG_PATH}/crowdsec-openresty-bouncer.conf"
83+
API_KEY=${API_KEY} CROWDSEC_LAPI_URL="${CROWDSEC_LAPI_URL}" envsubst '$API_KEY $CROWDSEC_LAPI_URL' < ./config/config_example.conf > "${CONFIG_PATH}/crowdsec-openresty-bouncer.conf"
8484
[ -n "${API_KEY}" ] && echo "New API key generated to be used in '${CONFIG_PATH}/crowdsec-openresty-bouncer.conf'"
8585
else
8686
#Patch the existing file with new parameters if the need to be added
@@ -155,7 +155,7 @@ install() {
155155
cp -r lua/lib/* "${LIB_PATH}/"
156156
cp templates/* "${DATA_PATH}/templates/"
157157
#Patch the nginx config file
158-
SSL_CERTS_PATH=${SSL_CERTS_PATH} envsubst < openresty/${NGINX_CONF} > "${NGINX_CONF_DIR}/${NGINX_CONF}"
158+
SSL_CERTS_PATH=${SSL_CERTS_PATH} envsubst '$SSL_CERTS_PATH' < openresty/${NGINX_CONF} > "${NGINX_CONF_DIR}/${NGINX_CONF}"
159159
sed -i 's|/etc/crowdsec/bouncers|'"${CONFIG_PATH}"'|' "${NGINX_CONF_DIR}/${NGINX_CONF}"
160160
}
161161

0 commit comments

Comments
 (0)