Files
2026-08-15 14:51:51 +08:00

26 lines
797 B
Python

import os
import paramiko
pw = os.environ["DEPLOY_PASSWORD"]
c = paramiko.SSHClient()
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
c.connect("20.191.152.26", username="wakka", password=pw, timeout=30)
cmds = [
"hostname -I",
"curl -s http://127.0.0.1:7777/guest-customer-service | grep CHATWOOT_CONFIG",
"sudo docker exec guest-chat printenv CHATWOOT_GUEST_BASE_URL FRONTEND_URL",
"curl -s -H Metadata:true 'http://169.254.169.254/metadata/instance/compute?api-version=2021-02-01&format=text' 2>/dev/null | head -20",
"command -v az || echo no-az",
]
for cmd in cmds:
print("===", cmd)
_, o, e = c.exec_command(cmd, timeout=30)
print(o.read().decode()[:800])
err = e.read().decode()
if err.strip():
print("ERR:", err[:200])
c.close()