feat: add boot staging configuration and automation utility scripts
This commit is contained in:
21
scripts/check_22_os.py
Normal file
21
scripts/check_22_os.py
Normal file
@@ -0,0 +1,21 @@
|
||||
import paramiko
|
||||
|
||||
ssh = paramiko.SSHClient()
|
||||
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
ssh.connect('140.44.4.22', username='root', key_filename=r'C:\Users\Snarf\.ssh\id_ed25519_snarfnet', timeout=10)
|
||||
|
||||
cmds = [
|
||||
"cat /etc/os-release",
|
||||
"cat /boot/dietpi/.version 2>/dev/null || cat /boot/firmware/dietpi/.version 2>/dev/null || echo 'Not DietPi'",
|
||||
"which dropbear || which sshd",
|
||||
"ip route show",
|
||||
"cat /etc/network/interfaces /etc/dhcpcd.conf /etc/netplan/* /etc/systemd/network/* 2>/dev/null",
|
||||
"systemctl cat k3s-agent.service 2>/dev/null || cat /etc/systemd/system/k3s-agent.service"
|
||||
]
|
||||
|
||||
for cmd in cmds:
|
||||
print(f"=== {cmd} ===")
|
||||
stdin, stdout, stderr = ssh.exec_command(cmd)
|
||||
print(stdout.read().decode())
|
||||
|
||||
ssh.close()
|
||||
Reference in New Issue
Block a user