Merge pull request #7352 from dataease/pr@dev_fix_init_pwd

fix: 修复升级版本时导致的初始密码被重置的问题
This commit is contained in:
fit2cloudrd 2023-12-26 15:00:06 +08:00 committed by GitHub
commit a272b2dfd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 1 deletions

View File

@ -15,6 +15,8 @@ DE_DORIS_FE_IP=172.19.0.198
DE_DORIS_BE_IP=172.19.0.199
## 登录超时时间单位min。如果不设置则默认8小时也就是480
DE_LOGIN_TIMEOUT=480
## 新建用户初始密码
DE_INIT_PASSWORD=DataEase123456
# 数据库配置
## 是否使用外部数据库

View File

@ -75,10 +75,12 @@ echo -e "*******************************************************\n" 2>&1 | tee -
if [[ -f $dataease_conf ]]; then
DE_LOGIN_TIMEOUT=$(prop $dataease_conf dataease.login_timeout)
DE_INIT_PASSWORD=$(prop $dataease_conf dataease.init_password)
DE_MYSQL_PARAMS=$(grep -P "^\s*[^#]?spring.datasource.url=.*$" $dataease_conf | cut -d'=' --complement -f1 | awk -F'?' '{print $2}')
fi
export DE_MYSQL_PARAMS
export DE_LOGIN_TIMEOUT=$([[ -z $DE_LOGIN_TIMEOUT ]] && echo -n 480 || echo -n $DE_LOGIN_TIMEOUT)
export DE_INIT_PASSWORD=$([[ -z $DE_INIT_PASSWORD ]] && echo -n DataEase123456 || echo -n $DE_INIT_PASSWORD)
if [[ -f $dataease_conf ]] && [[ ! ${DE_EXTERNAL_DORIS} ]]; then
export DE_DORIS_DB=$(prop $dataease_conf doris.db)

View File

@ -16,7 +16,7 @@ doris.port=${DE_DORIS_PORT}
doris.httpPort=${DE_DORIS_HTTPPORT}
#新建用户初始密码
dataease.init_password=DataEase123456
dataease.init_password=${DE_INIT_PASSWORD}
#登录超时时间单位min 如果不设置 默认8小时也就是480
dataease.login_timeout=${DE_LOGIN_TIMEOUT}