mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-22 22:36:06 +08:00
修复 config 引入顺序
This commit is contained in:
parent
e694570f1a
commit
162bd9d8cc
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -563,6 +563,7 @@ main() {
|
|||
fi
|
||||
}
|
||||
|
||||
import_config "$@"
|
||||
main "$@"
|
||||
|
||||
exit 0
|
||||
|
|
Loading…
Reference in New Issue
Block a user