@ssdavidai/zoclaw 1.1.4 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/scripts/bootstrap.sh +18 -3
package/package.json
CHANGED
package/scripts/bootstrap.sh
CHANGED
|
@@ -99,12 +99,27 @@ if ! pgrep -f openclaw-gateway > /dev/null 2>&1; then
|
|
|
99
99
|
exit 1
|
|
100
100
|
fi
|
|
101
101
|
|
|
102
|
+
# Read gateway port from config (default 18789)
|
|
103
|
+
GW_PORT=$(node -pe "JSON.parse(require('fs').readFileSync('${CONFIG}','utf8')).gateway?.port ?? 18789")
|
|
102
104
|
TOKEN=$(node -pe "JSON.parse(require('fs').readFileSync('${CONFIG}','utf8')).gateway?.auth?.token ?? ''")
|
|
103
|
-
|
|
105
|
+
|
|
106
|
+
# Set up tailscale serve to expose the gateway Control UI on the tailnet
|
|
107
|
+
echo "Configuring Tailscale Serve..."
|
|
108
|
+
tailscale serve --bg --https=443 "http://127.0.0.1:${GW_PORT}" 2>/dev/null && \
|
|
109
|
+
echo " ✓ Tailscale Serve → localhost:${GW_PORT}" || \
|
|
110
|
+
echo " Warning: could not configure tailscale serve"
|
|
111
|
+
|
|
112
|
+
# Get the MagicDNS name for this machine
|
|
113
|
+
TS_HOSTNAME=$(tailscale status --json 2>/dev/null | node -pe "
|
|
114
|
+
const s = JSON.parse(require('fs').readFileSync('/dev/stdin','utf8'));
|
|
115
|
+
(s.Self.DNSName || '').replace(/\\.\$/, '')
|
|
116
|
+
" 2>/dev/null || true)
|
|
104
117
|
|
|
105
118
|
echo ""
|
|
106
119
|
echo "Ready!"
|
|
107
120
|
echo " TUI: openclaw tui"
|
|
108
|
-
if [ -n "$
|
|
109
|
-
echo " Browser:
|
|
121
|
+
if [ -n "$TS_HOSTNAME" ] && [ -n "$TOKEN" ]; then
|
|
122
|
+
echo " Browser: https://${TS_HOSTNAME}?token=${TOKEN}"
|
|
123
|
+
echo ""
|
|
124
|
+
echo " Accessible from any device on your tailnet."
|
|
110
125
|
fi
|