From 162bd9d8ccad7fab2fa29d1f33e9864e34da133b Mon Sep 17 00:00:00 2001 From: whyour Date: Mon, 22 Jul 2024 23:29:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20config=20=E5=BC=95?= =?UTF-8?q?=E5=85=A5=E9=A1=BA=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/docker-entrypoint.sh | 1 + shell/share.sh | 6 ------ shell/task.sh | 1 + shell/update.sh | 1 + 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index deae25a0..6ba88f08 100755 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -5,6 +5,7 @@ dir_shell=/ql/shell . $dir_shell/env.sh echo -e "======================1. 检测配置文件========================\n" +import_config "$@" make_dir /etc/nginx/conf.d make_dir /run/nginx init_nginx diff --git a/shell/share.sh b/shell/share.sh index ffbbc436..41273901 100755 --- a/shell/share.sh +++ b/shell/share.sh @@ -91,10 +91,6 @@ import_config() { else default_cron="$(random_range 0 59) $(random_range 0 23) * * *" fi - - cpu_warn=${CpuWarn} - mem_warn=${MemoryWarn} - disk_warn=${DiskWarn} } set_proxy() { @@ -488,5 +484,3 @@ init_env detect_termux detect_macos define_cmd - -import_config $1 diff --git a/shell/task.sh b/shell/task.sh index e773569b..ad6e8fcd 100755 --- a/shell/task.sh +++ b/shell/task.sh @@ -113,6 +113,7 @@ init_begin_time() { begin_timestamp=$(format_timestamp "$time_format" "$time") } +import_config "$@" while getopts ":lm:" opt; do case $opt in l) diff --git a/shell/update.sh b/shell/update.sh index f34fa690..151830c3 100755 --- a/shell/update.sh +++ b/shell/update.sh @@ -563,6 +563,7 @@ main() { fi } +import_config "$@" main "$@" exit 0