From e56c0abb5000d9be8ff2e29221b2bee6057aa41a Mon Sep 17 00:00:00 2001 From: chenxi0599 Date: Sat, 8 Oct 2022 18:03:52 +0800 Subject: [PATCH] Update entrypoint.sh (#17219) fix: When the dataDir is configured in taos.cfg, the env DATA_DIR is wrong. --- packaging/docker/bin/entrypoint.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packaging/docker/bin/entrypoint.sh b/packaging/docker/bin/entrypoint.sh index 5fb441004d..27bd25430b 100755 --- a/packaging/docker/bin/entrypoint.sh +++ b/packaging/docker/bin/entrypoint.sh @@ -35,6 +35,9 @@ FIRST_EP_PORT=${TAOS_FIRST_EP#*:} SERVER_PORT=$(cat $CFG_FILE | grep -E -v "^#|^$" | grep serverPort | tail -n1 | sed -E 's/.*serverPort\s+//') SERVER_PORT=${SERVER_PORT:-6030} +# parse dataDir from taos.cfg +DATA_DIR=$(cat $CFG_FILE | grep -E -v "^#|^$" | grep dataDir | tail -n1 | sed -E 's/.*dataDir\s+//') + # for other binaries like interpreters if echo $1 | grep -E "taosd$" - >/dev/null; then true # will run taosd -- GitLab