回收 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)、记忆修复前备份。
29 lines
1.4 KiB
Bash
29 lines
1.4 KiB
Bash
set +e
|
||
V=/www/server/panel/vhost/nginx
|
||
S=$V/_pending-ai1net
|
||
echo "=== S2-1 启用前 nginx -t 基线 ==="
|
||
nginx -t 2>&1 | tail -1
|
||
echo "=== S2-2 拷入两份 vhost ==="
|
||
cp -a "$S/ai1net.com.conf" "$V/ai1net.com.conf"
|
||
cp -a "$S/relay-direct.ai1net.com.conf" "$V/relay-direct.ai1net.com.conf"
|
||
ls -l "$V/ai1net.com.conf" "$V/relay-direct.ai1net.com.conf" | awk '{print $5, $9}'
|
||
echo "=== S2-3 nginx -t(失败即自动回滚) ==="
|
||
if nginx -t 2>&1 | tail -1 | grep -q successful; then
|
||
echo "✅ 语法通过 → reload"
|
||
nginx -s reload 2>&1 | tail -1
|
||
else
|
||
echo "❌ 语法失败 → 立即回滚并保持原状"
|
||
nginx -t 2>&1 | tail -3
|
||
rm -f "$V/ai1net.com.conf" "$V/relay-direct.ai1net.com.conf"
|
||
nginx -t 2>&1 | tail -1
|
||
exit 9
|
||
fi
|
||
sleep 1
|
||
echo "=== S2-4 源站侧验收(绕过 CF,直连 47) ==="
|
||
curl -sk --http1.1 -o /dev/null -w "origin https://ai1net.com/portal.html => %{http_code}\n" -H "Host: ai1net.com" https://127.0.0.1/portal.html
|
||
curl -sk --http1.1 -o /dev/null -w "origin https://dsh.ai1net.com/ => %{http_code}\n" -H "Host: dsh.ai1net.com" https://127.0.0.1/
|
||
echo "--- 源站侧按 SNI 看证书是否已是 ai1net(不再回 alotbuy 那张)---"
|
||
echo | timeout 8 openssl s_client -connect 127.0.0.1:443 -servername ai1net.com 2>/dev/null | openssl x509 -noout -subject 2>/dev/null
|
||
echo "=== S2-5 门户旧域未受影响 ==="
|
||
curl -s -o /dev/null -w "alotbuy.com => %{http_code}\n" -H "Host: alotbuy.com" http://127.0.0.1/
|