






















@@ -39,12 +39,34 @@ stop_openclaw_gateway_processes() {
3939 OPENCLAW_DISABLE_BUNDLED_PLUGINS=1 /opt/homebrew/bin/openclaw gateway stop || true
4040 pkill -f 'openclaw.*gateway' >/dev/null 2>&1 || true
4141}
42+start_openclaw_gateway() {
43+ if /opt/homebrew/bin/openclaw gateway restart; then
44+ return
45+ fi
46+ pkill -f 'openclaw.*gateway' >/dev/null 2>&1 || true
47+ rm -f /tmp/openclaw-parallels-macos-gateway.log
48+ nohup env OPENCLAW_HOME="$HOME" OPENCLAW_STATE_DIR="$HOME/.openclaw" OPENCLAW_CONFIG_PATH="$HOME/.openclaw/openclaw.json" ${input.auth.apiKeyEnv}=${shellQuote(
49+ input.auth.apiKeyValue,
50+ )} /opt/homebrew/bin/openclaw gateway run --bind loopback --port 18789 --force >/tmp/openclaw-parallels-macos-gateway.log 2>&1 </dev/null &
51+}
52+wait_for_gateway() {
53+ deadline=$((SECONDS + 240))
54+ while [ "$SECONDS" -lt "$deadline" ]; do
55+ if /opt/homebrew/bin/openclaw gateway status --deep --require-rpc --timeout 15000; then
56+ return
57+ fi
58+ sleep 2
59+ done
60+ cat /tmp/openclaw-parallels-macos-gateway.log >&2 || true
61+ echo "gateway did not become ready after update" >&2
62+ exit 1
63+}
4264scrub_future_plugin_entries
4365stop_openclaw_gateway_processes
4466OPENCLAW_DISABLE_BUNDLED_PLUGINS=1 /opt/homebrew/bin/openclaw update --tag ${shellQuote(input.updateTarget)} --yes --json
4567${posixVersionCheck("/opt/homebrew/bin/openclaw", input.expectedNeedle)}
46-/opt/homebrew/bin/openclaw gateway restart
47-/opt/homebrew/bin/openclaw gateway status --deep --require-rpc
68+start_openclaw_gateway
69+wait_for_gateway
4870/opt/homebrew/bin/openclaw models set ${shellQuote(input.auth.modelId)}
4971/opt/homebrew/bin/openclaw config set agents.defaults.skipBootstrap true --strict-json
5072${posixAgentWorkspaceScript("Parallels npm update smoke test assistant.")}
@@ -122,12 +144,33 @@ stop_openclaw_gateway_processes() {
122144 OPENCLAW_DISABLE_BUNDLED_PLUGINS=1 openclaw gateway stop || true
123145 pkill -f 'openclaw.*gateway' >/dev/null 2>&1 || true
124146}
147+start_openclaw_gateway() {
148+ pkill -f "openclaw gateway run" >/dev/null 2>&1 || true
149+ rm -f /tmp/openclaw-parallels-linux-gateway.log
150+ setsid sh -lc ${shellQuote(
151+ `exec env OPENCLAW_HOME=/root OPENCLAW_STATE_DIR=/root/.openclaw OPENCLAW_CONFIG_PATH=/root/.openclaw/openclaw.json OPENCLAW_DISABLE_BONJOUR=1 ${input.auth.apiKeyEnv}=${shellQuote(
152+ input.auth.apiKeyValue,
153+ )} openclaw gateway run --bind loopback --port 18789 --force >/tmp/openclaw-parallels-linux-gateway.log 2>&1`,
154+ )} >/dev/null 2>&1 < /dev/null &
155+}
156+wait_for_gateway() {
157+ deadline=$((SECONDS + 240))
158+ while [ "$SECONDS" -lt "$deadline" ]; do
159+ if openclaw gateway status --deep --require-rpc --timeout 15000; then
160+ return
161+ fi
162+ sleep 2
163+ done
164+ cat /tmp/openclaw-parallels-linux-gateway.log >&2 || true
165+ echo "gateway did not become ready after update" >&2
166+ exit 1
167+}
125168scrub_future_plugin_entries
126169stop_openclaw_gateway_processes
127170OPENCLAW_DISABLE_BUNDLED_PLUGINS=1 openclaw update --tag ${shellQuote(input.updateTarget)} --yes --json
128171${posixVersionCheck("openclaw", input.expectedNeedle)}
129-openclaw gateway restart
130-openclaw gateway status --deep --require-rpc
172+start_openclaw_gateway
173+wait_for_gateway
131174openclaw models set ${shellQuote(input.auth.modelId)}
132175openclaw config set agents.defaults.skipBootstrap true --strict-json
133176${posixAgentWorkspaceScript("Parallels npm update smoke test assistant.")}
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。