This is an automated email from the ASF dual-hosted git repository.
gavinchou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new de6a00654b9 [chore](bash) support read env variables from
doris_cloud.conf (#38060)
de6a00654b9 is described below
commit de6a00654b9fe4f939acae406c2c58b6dce305ce
Author: yagagagaga <[email protected]>
AuthorDate: Tue Jul 23 20:20:31 2024 +0800
[chore](bash) support read env variables from doris_cloud.conf (#38060)
---
cloud/script/start.sh | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/cloud/script/start.sh b/cloud/script/start.sh
index e119e193d82..94638957a86 100644
--- a/cloud/script/start.sh
+++ b/cloud/script/start.sh
@@ -40,6 +40,20 @@ for arg; do
done
# echo "$@" "daemonized=${daemonized}"}
+# export env variables from doris_cloud.conf
+# read from doris_cloud.conf
+while read -r line; do
+ envline="$(echo "${line}" |
+ sed 's/[[:blank:]]*=[[:blank:]]*/=/g' |
+ sed 's/^[[:blank:]]*//g' |
+ grep -E "^[[:upper:]]([[:upper:]]|_|[[:digit:]])*=" ||
+ true)"
+ envline="$(eval "echo ${envline}")"
+ if [[ "${envline}" == *"="* ]]; then
+ eval 'export "${envline}"'
+ fi
+done <"${DORIS_HOME}/conf/doris_cloud.conf"
+
process=doris_cloud
if [[ -f "${DORIS_HOME}/bin/${process}.pid" ]]; then
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]