From 1b28daf7cbbf3f3bbd3b07755de14c36251d3338 Mon Sep 17 00:00:00 2001 From: vagrant Date: Thu, 26 Apr 2018 13:20:47 +0000 Subject: fix restart script policy fetch logic Change-Id: I8ebf079a9a1c5e064fdbae216663fb050e9fd71e Signed-off-by: Vijay Venkatesh Kumar Issue-ID: DCAEGEN2-464 --- tca-cdap-container/restart.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tca-cdap-container/restart.sh b/tca-cdap-container/restart.sh index d9e53b3..589b29d 100755 --- a/tca-cdap-container/restart.sh +++ b/tca-cdap-container/restart.sh @@ -184,7 +184,7 @@ function tca_poll_policy { CONFIG=$(echo $HTTP_BODY | jq .config.app_config) PREF=$(echo $HTTP_BODY | jq .config.app_preferences) POLICY=$(echo $HTTP_BODY | jq .policies.items[0].config.content) - NEWPREF=$(echo $PREF | jq --arg tca_policy "$POLICY" '. + {tca_policy: $tca_policy}') + NEWPREF=$(echo $PREF | jq --arg tca_policy "$POLICY" '. + {$tca_policy}') NEWPREF=$(echo $NEWPREF | sed 's/\\n//g') echo $CONFIG | jq . --sort-keys > "${TCA_CONF_TEMP}" echo $NEWPREF | jq . --sort-keys > "${TCA_PREF_TEMP}" -- cgit 1.2.3-korg