feat: add diagnostic and maintenance scripts for Pi-hole, Technitium, and Nginx Proxy Manager

This commit is contained in:
2026-11-07 13:43:11 -05:00
parent 4e8f93173e
commit 34cfece0b0
11 changed files with 123 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
import paramiko
client = paramiko.SSHClient()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
client.connect("140.44.4.11", username="root", key_filename=r"C:\Users\Snarf\.ssh\id_ed25519_snarfnet", timeout=10)
for tbl in ["network", "network_addresses"]:
cmd = f'k3s kubectl exec -n dns deploy/pihole -c pihole -- pihole-FTL sqlite3 /etc/pihole/pihole-FTL.db "SELECT count(*) FROM {tbl};"'
stdin, stdout, stderr = client.exec_command(cmd)
print(f"{tbl} count:", stdout.read().decode().strip(), stderr.read().decode().strip())
client.close()