Files
ai-customer-service/guest-cs-stack/_verify_remote.py
T
2026-08-15 14:51:51 +08:00

17 lines
522 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 = [
'sudo docker exec guest-chat printenv | grep -E "CHATWOOT_GUEST|FRONTEND"',
"curl -s http://127.0.0.1:7777/guest-customer-service | grep websiteToken | head -c 200",
]
for cmd in cmds:
print("===", cmd)
_, o, e = c.exec_command(cmd, timeout=60)
print(o.read().decode())
c.close()