Shield external portal jumps (keep EXTERNAL_* for later), serve /nav from static build, and proxy /book + /community to vertical Next apps with Caddy notes. Co-authored-by: Cursor <cursoragent@cursor.com>
21 lines
685 B
Python
21 lines
685 B
Python
import paramiko
|
|
from pathlib import Path
|
|
|
|
c = paramiko.SSHClient()
|
|
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
c.connect("82.157.112.245", username="ubuntu", password="Xiao4669805", timeout=20)
|
|
cmd = """
|
|
sudo cat /www/server/panel/vhost/nginx/api.nomadro.cn.conf
|
|
echo '=== reload ==='
|
|
sudo nginx -t && sudo /etc/init.d/nginx reload
|
|
sleep 1
|
|
curl -s --resolve api.nomadro.cn:443:127.0.0.1 https://api.nomadro.cn/health -k
|
|
echo
|
|
curl -s --resolve admin.nomadro.cn:80:127.0.0.1 http://admin.nomadro.cn/ | head -c 150
|
|
echo
|
|
"""
|
|
_, o, _ = c.exec_command(cmd)
|
|
Path("deploy/remote-verify4.txt").write_text(o.read().decode("utf-8", "replace"), encoding="utf-8")
|
|
c.close()
|
|
print("ok")
|