Files
exposedgays/deploy/test-ingress-rule.py

13 lines
606 B
Python

#!/usr/bin/env python3
import paramiko
PASS = "Bbt9115xty9176!"
c = paramiko.SSHClient()
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
c.connect("10.10.0.10", username="localadministrator", password=PASS, timeout=30)
for url in ["https://exposedgays.com/", "https://www.exposedgays.com/", "https://thepinkpulse.com/"]:
cmd = f"echo '{PASS}' | sudo -S cloudflared tunnel ingress rule '{url}' --config /etc/cloudflared/config.yml 2>&1"
print(f"\n=== {url} ===")
_, o, e = c.exec_command(cmd, timeout=20)
o.channel.recv_exit_status()
print((o.read()+e.read()).decode())
c.close()