Skip to content

Commit

Permalink
added if statement to notice about new API key, if cscli is not avail…
Browse files Browse the repository at this point in the history
…able don't show it.
  • Loading branch information
LePresidente committed Mar 8, 2022
1 parent e957d04 commit cd2d569
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ gen_config_file() {
API_KEY=$(cscli bouncers add "crowdsec-openresty-bouncer-${SUFFIX}" -o raw)
fi
API_KEY=${API_KEY} CROWDSEC_LAPI_URL="http://127.0.0.1:8080" envsubst < ./config/config_example.conf > "${CONFIG_PATH}/crowdsec-openresty-bouncer.conf"
echo "New API key generated to be used in '${CONFIG_PATH}/crowdsec-openresty-bouncer.conf'"
[ -n "${API_KEY}" ] && echo "New API key generated to be used in '${CONFIG_PATH}/crowdsec-openresty-bouncer.conf'"
else
#Patch the existing file with new parameters if the need to be added
echo "Patch crowdsec-openresty-bouncer.conf .."
Expand Down

0 comments on commit cd2d569

Please sign in to comment.