fix: validate ARMv6 upgrades and publish rolling development bundles

This commit is contained in:
whyour
2026-10-21 01:43:44 +08:00
parent 77fe551425
commit b486989399
29 changed files with 977 additions and 201 deletions
+15 -2
View File
@@ -294,6 +294,18 @@ delete_pm2() {
pkill -f "node.*static/build/app.js" 2>/dev/null || true
}
load_node_runtime_args() {
ql_node_runtime_args=()
local runtime_args
local helper="$dir_root/cli/src/internal/maintenance/nodeRuntime.cjs"
if [[ -f "$helper" ]]; then
runtime_args=$(node "$helper") || return $?
if [[ -n "$runtime_args" ]]; then
read -r -a ql_node_runtime_args <<<"$runtime_args"
fi
fi
}
reload_pm2() {
cd "$dir_root" || return $?
restore_env_vars
@@ -305,6 +317,7 @@ reload_pm2() {
local exit_code=$?
t '警告: PM2 启动失败 (退出码: %s),可能是由于硬件不兼容' "$exit_code"
t '正在尝试直接使用 Node.js 启动服务...'
load_node_runtime_args || return $?
# Kill any existing node processes for qinglong
pkill -f "node.*static/build/app.js" 2>/dev/null || true
@@ -312,9 +325,9 @@ reload_pm2() {
# Start node directly in the background. In containers, keep application
# output on the container streams instead of duplicating Winston logs on disk.
if [[ "$QL_CONTAINER" == "true" ]]; then
nohup node static/build/app.js >/proc/1/fd/1 2>/proc/1/fd/2 &
nohup node "${ql_node_runtime_args[@]}" static/build/app.js >/proc/1/fd/1 2>/proc/1/fd/2 &
else
nohup node static/build/app.js >"$dir_log/qinglong.log" 2>&1 &
nohup node "${ql_node_runtime_args[@]}" static/build/app.js >"$dir_log/qinglong.log" 2>&1 &
fi
local node_pid=$!
+3 -2
View File
@@ -54,7 +54,8 @@ fix_config
# Slow devices may need more than the worker's readiness window to generate
# first-boot certificates. Reuse the regular initializer before starting workers.
node <<'QL_PREPARE_GRPC_CERTS'
load_node_runtime_args
node "${ql_node_runtime_args[@]}" <<'QL_PREPARE_GRPC_CERTS'
require(require('node:path').join(process.env.QL_DIR, 'static/build/config/grpcCerts.js'))
.initGrpcCerts()
.catch((error) => {
@@ -63,7 +64,7 @@ require(require('node:path').join(process.env.QL_DIR, 'static/build/config/grpcC
});
QL_PREPARE_GRPC_CERTS
pm2 l &>/dev/null
pm2 l &>/dev/null || true
log_with_style "INFO" "$(t '🔄 2. 启动 nginx...')"
nginx -s reload 2>/dev/null || nginx -c /etc/nginx/nginx.conf