Files
memind/ops/rollback-wechat-mp-20260618.sh
john 229805a070 Improve WeChat MP replies and ship MindSpace/H5 production updates.
Add WeChat service account routing with sync acks, connectivity tests, and context isolation; document deploy runbooks; and bundle related MindSpace, voice, Plaza, and server gateway changes for production rollout.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-19 23:06:43 +08:00

27 lines
583 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
ROOT="/Users/john/Project/Memind"
BACKUP="/Users/john/Project/.codex-baselines/Memind/wechat-service-agent-20260618-084500/.env.before-prod-mp-20260618-092652"
NODE_BIN="/opt/homebrew/opt/node@24/bin/node"
cd "$ROOT"
if [[ ! -f "$BACKUP" ]]; then
echo "backup env not found: $BACKUP" >&2
exit 1
fi
cp "$BACKUP" .env
PORT_PID="$(lsof -tiTCP:8081 -sTCP:LISTEN || true)"
if [[ -n "$PORT_PID" ]]; then
kill "$PORT_PID"
sleep 2
fi
nohup "$NODE_BIN" server.mjs >> h5.log 2>&1 &
echo $! > .h5.pid
sleep 3
curl -s http://127.0.0.1:8081/api/status