From c23d367036791610f8f6b699db8ce44a2b8b560f Mon Sep 17 00:00:00 2001 From: Taras Date: Tue, 20 Dec 2016 11:13:34 +0200 Subject: [PATCH] allow load not only yaml files add a parameter to specify the format of the config files, but default still will be "yml" --- load-config.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/load-config.sh b/load-config.sh index f8e19ad..b3a26a2 100755 --- a/load-config.sh +++ b/load-config.sh @@ -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%%.*} @@ -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/