Initial clean project import

This commit is contained in:
cat-shark
2026-06-19 18:41:41 +08:00
commit a13b804c7a
1306 changed files with 220568 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
import paramiko
client = paramiko.SSHClient()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
client.connect('152.136.232.83', port=22, username='root', password='Jianhua105', timeout=10)
def run(cmd):
print(f"\n>>> {cmd[:120]}")
stdin, stdout, stderr = client.exec_command(cmd, timeout=20)
out = stdout.read().decode('utf-8', errors='replace').strip()
err = stderr.read().decode('utf-8', errors='replace').strip()
if out: print(out[-800:])
if err: print(f"ERR: {err[-200:]}")
return out
# Restore backup
run("cp /www/wwwroot/zhinengtiapp/index.js.bak.update /www/wwwroot/zhinengtiapp/index.js")
# Verify syntax
run("node --check /www/wwwroot/zhinengtiapp/index.js 2>&1")
# Restart
run("cd /www/wwwroot/zhinengtiapp && pm2 delete ai-video 2>/dev/null; pm2 start index.js --name ai-video 2>&1")
run("sleep 3 && pm2 list")
# Test it's running
run("curl -s http://localhost:3001/api/health 2>/dev/null || curl -s http://localhost:3001/ 2>/dev/null | head -100")
client.close()
print("\n=== RESTORE DONE ===")