feat: add various infrastructure check and automation scripts

This commit is contained in:
2026-11-15 17:17:41 -05:00
parent 336b7759d0
commit b301aa3ece
232 changed files with 8274 additions and 298 deletions

View File

@@ -0,0 +1,28 @@
import paramiko
import sys
sys.stdout.reconfigure(encoding='utf-8')
KEY_FILE = r'C:\Users\Snarf\.ssh\id_ed25519_snarfnet'
IP = '14.4.4.44'
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect(IP, username='snarf', key_filename=KEY_FILE, timeout=10)
def run(cmd):
print(f"\n>>> {cmd}")
_, o, e = ssh.exec_command(cmd)
out = o.read().decode().strip()
if out:
print(out)
return out
run("uptime")
run("cat /etc/nut/nut.conf")
run("cat /etc/nut/ups.conf")
run("cat /etc/nut/upsmon.conf | grep -v '^#' | grep -v '^$'")
run("ps aux | grep -i nut")
run("ls -la /run/nut")
ssh.close()