2
0

fix: env配置

This commit is contained in:
caiyuchao
2025-06-19 14:08:25 +08:00
parent 2bd9683756
commit bc8e2ad86f

View File

@@ -48,9 +48,9 @@ case "$1" in
systemctl enable wfccontrol.service systemctl enable wfccontrol.service
fi fi
# if [ ! -f ${docker_work_dir}/docker-compose.yml ]; then if [ ! -f ${docker_work_dir}/docker-compose.yml ]; then
cp ${docker_work_dir}/compose/docker-compose.yml ${docker_work_dir}/docker-compose.yml cp ${docker_work_dir}/compose/docker-compose.yml ${docker_work_dir}/docker-compose.yml
# fi fi
# 获取传入的IP地址 # 获取传入的IP地址
new_ip=$2 new_ip=$2
@@ -60,9 +60,9 @@ case "$1" in
org_env_file=${docker_work_dir}/.env org_env_file=${docker_work_dir}/.env
tmp_env_file=${docker_work_dir}/temp.env tmp_env_file=${docker_work_dir}/temp.env
# if [ ! -f ${org_env_file} ]; then if [ ! -f ${org_env_file} ]; then
cp ${def_env_file} ${org_env_file} cp ${def_env_file} ${org_env_file}
# fi fi
# copy default config files to conf directory # copy default config files to conf directory
for conf_dir in $conf_dirs; do for conf_dir in $conf_dirs; do
@@ -135,10 +135,14 @@ case "$1" in
mv $tmp_nginx_conf $org_nginx_conf mv $tmp_nginx_conf $org_nginx_conf
# 统一替换系统名 # 统一替换系统名
nginx_html_zh=${docker_work_dir}/nginx/html/dist/u/langs/zh-cn.js nginx_html_u_zh=${docker_work_dir}/nginx/html/dist/u/langs/zh-cn.js
nginx_html_en=${docker_work_dir}/nginx/html/dist/u/langs/en-us.js nginx_html_u_en=${docker_work_dir}/nginx/html/dist/u/langs/en-us.js
sed -i "3s|title: '.*'|title: '${SYSTEM_TITLE}'|" $nginx_html_zh nginx_html_sys_zh=${docker_work_dir}/nginx/html/dist/sys/langs/zh-cn.js
sed -i "3s|title: '.*'|title: '${SYSTEM_TITLE}'|" $nginx_html_en nginx_html_sys_en=${docker_work_dir}/nginx/html/dist/sys/langs/en-us.js
sed -i "3s|title: '.*'|title: '${SYSTEM_TITLE}'|" $nginx_html_u_zh
sed -i "3s|title: '.*'|title: '${SYSTEM_TITLE}'|" $nginx_html_u_en
sed -i "3s|title: '.*'|title: '${SYSTEM_TITLE}'|" $nginx_html_sys_zh
sed -i "3s|title: '.*'|title: '${SYSTEM_TITLE}'|" $nginx_html_sys_en
# chown and chmod for all docker work directory # chown and chmod for all docker work directory
if [ -d ${docker_work_dir}/mysql/data ]; then if [ -d ${docker_work_dir}/mysql/data ]; then