Files
dsh_ai1net_server/归档/域名迁移_ai1net_20260919/_fix106.sh
T
admin ce8e6ceed9 chore(工作区): 纳入版本控制基线(回收 411 MB 过程产物)
回收 411 MB(470 M → 58.8 M),全部经回收站,可恢复:
- 待清理/(146.2 M,含 relay 分片 128 M 与 42 项过程目录)
- tmp/(32.4 M,按接续棒命名的过程临时区)
- .workbuddy/tmp/(39.5 M)
- 4 份 workbuddy.db 冗余副本(101 M,09-23 事故的坏副本 / 抢救产物)
- tmp/im16/gw/centrifugo 二进制(63.9 M,可重下)+ 缓存残留

入库范围:常驻规则(CODEBUDDY.md / README.md / state.py)、在途接续入口与
接续包、docs/、交付物/、交接单/、归档/、scripts/、.codebuddy/、
.workbuddy/memory/;共 398 件,其中 >60 KB 的 26 件全为文档。

排除(.gitignore):tmp/、待清理/、运行态日志与缓存、*.db 与 DB 备份整目录、
打包二进制(*.tar.gz / *.tgz)、记忆修复前备份。
2026-09-24 07:51:03 +08:00

25 lines
1.7 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
set -u
TS=$(date +%Y%m%d-%H%M%S)
echo "=== [1] 备份 ==="
cp -a /etc/dshs-worker.env "/etc/dshs-worker.env.bak-dom-$TS"
cp -a /etc/systemd/system/dshs-relay-client.service "/etc/systemd/system/dshs-relay-client.service.bak-dom-$TS"
ls -la "/etc/dshs-worker.env.bak-dom-$TS" "/etc/systemd/system/dshs-relay-client.service.bak-dom-$TS"
echo "=== [2] worker env:rendezvous 切新域 + 追加种子(加性)==="
sed -i 's|^DSHS_RENDEZVOUS_URL=wss://alotbuy\.com/dshs-relay$|DSHS_RENDEZVOUS_URL=wss://ai1net.com/dshs-relay|' /etc/dshs-worker.env
if ! grep -q '^DSHS_OVERLAY_BOOTSTRAP_SEEDS=' /etc/dshs-worker.env; then
printf 'DSHS_OVERLAY_BOOTSTRAP_SEEDS=https://ai1net.com/dshs-relay,https://alotbuy.com/dshs-relay,https://relay-direct.ai1net.com/dshs-relay,https://relay-direct.alotbuy.com/dshs-relay,https://106.54.21.172/dshs-relay\n' >> /etc/dshs-worker.env
fi
grep -nE "RENDEZVOUS|BOOTSTRAP_SEEDS" /etc/dshs-worker.env
echo "=== [3] relay-client 单元:--url 切新域 ==="
sed -i 's|--url wss://alotbuy\.com/dshs-relay|--url wss://ai1net.com/dshs-relay|' /etc/systemd/system/dshs-relay-client.service
grep -n "ExecStart" /etc/systemd/system/dshs-relay-client.service
echo "=== [4] 残留 alotbuy 检查(应无 RENDEZVOUS/--url 命中)==="
grep -rn "alotbuy" /etc/dshs-worker.env /etc/systemd/system/dshs-relay-client.service | grep -v "BOOTSTRAP_SEEDS" || echo "(除种子兜底外无残留)"
echo "=== [5] daemon-reload + restart dshs-worker ==="
systemctl daemon-reload
systemctl restart dshs-worker
sleep 8
systemctl is-active dshs-worker dshs-relay
echo "=== [6] 启动日志 ==="
journalctl -u dshs-worker --since @$(date -d '90 sec ago' +%s) --no-pager 2>/dev/null | grep -iE "overlay-candidates|relay-client|registered|落点" | tail -8