import sys from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parent)) import vps_ssh print("==== routers") c, o = vps_ssh.run("python3 /tmp/_tmp_wo_mysql.py") print(c, o) print("==== wg show") c, o = vps_ssh.run("sudo wg show", timeout=40, sudo=True) print(c, o[-5000:]) print("==== ping nko candidates") # router ids from previous dumps: 13 nkoabang c, o = vps_ssh.run( "python3 /tmp/_tmp_wo_mysql.py \"SELECT id,name,slug,ip_address FROM tbl_routers WHERE id IN (13,15) OR slug LIKE '%nko%' OR slug LIKE '%hub%'\"" ) print(c, o)