From c55b3cedaf586a741d6bfbed6f5559b1c4d6ba6f Mon Sep 17 00:00:00 2001 From: Venkata Harish K Kajur Date: Wed, 20 Sep 2017 02:43:58 +0000 Subject: Fix the updateQuery to be run by aaiadmin Also ensure that this is only run once when the first time the container is started so during restart this won't be triggered Issue-ID: AAI-307 Change-Id: I31ea9e86c12b52083d8141e863e557f0c8b6b322 Signed-off-by: Venkata Harish K Kajur --- aai-traversal/src/main/resources/docker/docker-entrypoint.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'aai-traversal') diff --git a/aai-traversal/src/main/resources/docker/docker-entrypoint.sh b/aai-traversal/src/main/resources/docker/docker-entrypoint.sh index 464683a..5823105 100644 --- a/aai-traversal/src/main/resources/docker/docker-entrypoint.sh +++ b/aai-traversal/src/main/resources/docker/docker-entrypoint.sh @@ -60,7 +60,12 @@ if [ -z ${DISABLE_UPDATE_QUERY} ]; then sleep 5; done - /opt/app/aai-traversal/bin/install/updateQueryData.sh + UPDATE_QUERY_RAN_FILE="updateQueryRan.txt"; + + if [ ! -f ${UPDATE_QUERY_RAN_FILE} ]; then + gosu aaiadmin /opt/app/aai-traversal/bin/install/updateQueryData.sh + touch ${UPDATE_QUERY_RAN_FILE}; + fi fi CP=${COMMONLIBS_HOME}/*; -- cgit 1.2.3-korg