mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-01 04:40:38 +08:00
Fix QlPort and QlGrpcPort environment variables ignored in host network mode and pm2 reload (#2825)
* Initial plan * Fix host mode port configuration by using QlPort environment variable Co-authored-by: whyour <22700758+whyour@users.noreply.github.com> * Fix GRPC_PORT conflict in host network mode Co-authored-by: whyour <22700758+whyour@users.noreply.github.com> * Ensure BACK_PORT and GRPC_PORT survive pm2 reload with --update-env Co-authored-by: whyour <22700758+whyour@users.noreply.github.com> * Move env.sh sourcing after fix_config to preserve more environment variables Co-authored-by: whyour <22700758+whyour@users.noreply.github.com> * Refactor: Extract export_ql_envs function and move env.sh sourcing earlier Co-authored-by: whyour <22700758+whyour@users.noreply.github.com> * Extract load_ql_envs function and reorder initialization in docker-entrypoint.sh and update.sh Co-authored-by: whyour <22700758+whyour@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
This commit is contained in:
+3
-3
@@ -31,7 +31,7 @@ pm2_log() {
|
||||
}
|
||||
|
||||
check_ql() {
|
||||
local api=$(curl -s --noproxy "*" "http://0.0.0.0:5700")
|
||||
local api=$(curl -s --noproxy "*" "http://0.0.0.0:${ql_port}")
|
||||
echo -e "\n=====> 检测面板\n\n$api\n"
|
||||
if [[ $api =~ "<div id=\"root\"></div>" ]]; then
|
||||
echo -e "=====> 面板服务启动正常\n"
|
||||
@@ -42,10 +42,10 @@ check_pm2() {
|
||||
pm2_log
|
||||
local currentTimeStamp=$(date +%s)
|
||||
local api=$(
|
||||
curl -s --noproxy "*" "http://0.0.0.0:5700/api/system?t=$currentTimeStamp" \
|
||||
curl -s --noproxy "*" "http://0.0.0.0:${ql_port}/api/system?t=$currentTimeStamp" \
|
||||
-H 'Accept: */*' \
|
||||
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36' \
|
||||
-H 'Referer: http://0.0.0.0:5700/crontab' \
|
||||
-H "Referer: http://0.0.0.0:${ql_port}/crontab" \
|
||||
-H 'Accept-Language: en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7' \
|
||||
--compressed
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user