Skip to content

Commit

Permalink
allow load not only yaml files
Browse files Browse the repository at this point in the history
add a parameter to specify the format of the config files, but default still will be "yml"
  • Loading branch information
taraspos authored Dec 20, 2016
1 parent 7b1dad3 commit c23d367
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions load-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ cat jhi-acl.json | sed s/to-change-in-production-client/$CLIENT_ACL_TOKEN/ | cur
echo "----------------------------------------------------------------------
Starting Consul Config Loader in $CONFIG_MODE mode"

function loadPropertiesFilesIntoConsul {
for file in $CONFIG_DIR/*.yml
function loadPropertiesFilesIntoConsul {
for file in $CONFIG_DIR/*."${CONFIG_FORMAT:-yml}"
do
filename=$(basename $file)
app=${filename%%.*}
Expand All @@ -30,7 +30,7 @@ function loadPropertiesFilesIntoConsul {

if [[ "$CONFIG_MODE" == "filesystem" ]]; then
echo "----------------------------------------------------------------------
Loading YAML config files in Consul K/V Store from the filesystem
Loading config files in Consul K/V Store from the filesystem
Add or edit properties files in '$CONFIG_DIR' to have them
automatically reloaded into Consul
Consul UI: http://$CONSUL_URL:$CONSUL_PORT/ui/#/dc1/kv/config/
Expand Down

0 comments on commit c23d367

Please sign in to comment.