mirror of
https://github.com/hotwa/luci-app-openclaw.git
synced 2026-03-30 20:25:44 +00:00
fix(init): remove unreferenced network trigger macro that caused install crash
This commit is contained in:
@@ -128,7 +128,7 @@ function action_status()
|
||||
|
||||
-- 如果端口未监听但 procd 进程存在,说明正在启动中 (gateway 初始化需要数分钟)
|
||||
if not result.gateway_running and enabled == "1" then
|
||||
local procd_pid = sys.exec("pgrep -f 'openclaw.*gateway|node.*openclaw.*gateway' 2>/dev/null | head -1"):gsub("%s+", "")
|
||||
local procd_pid = sys.exec("pgrep -f 'openclaw.*gateway' 2>/dev/null | head -1"):gsub("%s+", "")
|
||||
if procd_pid ~= "" then
|
||||
result.gateway_starting = true
|
||||
end
|
||||
|
||||
@@ -336,7 +336,7 @@ fi
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger "openclaw"
|
||||
procd_add_network_trigger "lan" "wan"
|
||||
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
|
||||
@@ -226,7 +226,7 @@ if [ -x /etc/init.d/openclaw ]; then
|
||||
# 等待进程退出和端口释放
|
||||
sleep 2
|
||||
# 确保 gateway 子进程也已退出
|
||||
for pid in $(pgrep -f "node.*openclaw|openclaw.*gateway" 2>/dev/null); do
|
||||
for pid in $(pgrep -f "openclaw-gateway" 2>/dev/null); do
|
||||
kill "$pid" 2>/dev/null
|
||||
done
|
||||
sleep 1
|
||||
|
||||
Reference in New Issue
Block a user