From bc8e2ad86f9ebcaa5cde5c52c5fe0ea6987bdca6 Mon Sep 17 00:00:00 2001 From: caiyuchao Date: Thu, 19 Jun 2025 14:08:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20env=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/bin/wfcsetup.sh | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/build/bin/wfcsetup.sh b/build/bin/wfcsetup.sh index 1a6769c..7a5a909 100755 --- a/build/bin/wfcsetup.sh +++ b/build/bin/wfcsetup.sh @@ -48,9 +48,9 @@ case "$1" in systemctl enable wfccontrol.service 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 -# fi + fi # 获取传入的IP地址 new_ip=$2 @@ -60,9 +60,9 @@ case "$1" in org_env_file=${docker_work_dir}/.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} - # fi + fi # copy default config files to conf directory for conf_dir in $conf_dirs; do @@ -135,10 +135,14 @@ case "$1" in mv $tmp_nginx_conf $org_nginx_conf # 统一替换系统名 - nginx_html_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 - sed -i "3s|title: '.*'|title: '${SYSTEM_TITLE}'|" $nginx_html_zh - sed -i "3s|title: '.*'|title: '${SYSTEM_TITLE}'|" $nginx_html_en + nginx_html_u_zh=${docker_work_dir}/nginx/html/dist/u/langs/zh-cn.js + nginx_html_u_en=${docker_work_dir}/nginx/html/dist/u/langs/en-us.js + nginx_html_sys_zh=${docker_work_dir}/nginx/html/dist/sys/langs/zh-cn.js + 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 if [ -d ${docker_work_dir}/mysql/data ]; then