This commit is contained in:
孙小云 2025-06-11 12:52:16 +08:00
parent 3522cc7803
commit 96a082a805
2 changed files with 9 additions and 9 deletions

View File

@ -40,13 +40,12 @@ for conf_file in vhosts/*.conf; do
# 读取原始文件内容 # 读取原始文件内容
content=$(cat "$conf_file") content=$(cat "$conf_file")
# 获取environment.sh中所有环境变量 # 获取所有环境变量包括export和非export的
env_vars=$(grep -E "^export [A-Z_]+" ../environment.sh | sed 's/export //') env_vars=$(env | grep -E "^[A-Z_]+=" | cut -d= -f1)
# 逐个替换环境变量 # 逐个替换环境变量
for var in $env_vars; do for var_name in $env_vars; do
var_name=$(echo $var | cut -d= -f1) var_value="${!var_name}"
var_value=${!var_name}
if [ ! -z "$var_value" ]; then if [ ! -z "$var_value" ]; then
# 使用更安全的变量替换方法 # 使用更安全的变量替换方法
pattern="\\\${$var_name}" pattern="\\\${$var_name}"

View File

@ -10,12 +10,13 @@ host 文件中添加以下内容
2.3 联系拓恒提供mysql刷数脚本 2.3 联系拓恒提供mysql刷数脚本
3: 将修改后的 bazhong.sh 文件提供给 拓恒 3: 将修改后的 bazhong.sh 文件提供给 拓恒
4: 拓恒打镜像 4: 拓恒打镜像
5: 依次执行 start文件夹下的启动脚本; 采用 ./xxx.sh 的方式执行,不要使用 sh ./xxx.sh 的方式执行; 执行前需要 source bazhong.sh 5: 依次执行 start文件夹下的启动脚本; 采用 ./xxx.sh 的方式执行,不要使用 sh ./xxx.sh 的方式执行;
5.1 oidcservice 5.1 oidcservice
5.2 hhzadmin 5.2 hhzadmin
5.3 hhzapi 5.3 hhzapi
5.4 dspapi 5.4 dspapi
5.5 网关的启动脚本 startGateWay.sh replace_vars.sh 不需要手动执行) 5.5 网关的启动脚本 gateway/startGateWay.sh replace_vars.sh 不需要手动执行)
5.6 ginx.sh 启动脚本最后执行 5.6 nginx.sh 启动脚本最后执行
后期升级的时候只需要执行start文件夹下的启动脚本之前前都需要执行 source ../bazhong.sh