feat(power): complete Phase 7 Power Resilience & UPS Automation deployment and verification
This commit is contained in:
15
scripts/check_nut_users.py
Normal file
15
scripts/check_nut_users.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import paramiko
|
||||
|
||||
def main():
|
||||
ssh = paramiko.SSHClient()
|
||||
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
ssh.connect('14.4.4.44', username='root', key_filename=r'C:\Users\Snarf\.ssh\id_ed25519_snarfnet', timeout=10)
|
||||
|
||||
stdin, stdout, stderr = ssh.exec_command('grep -E "NOTIFY|SHUTDOWN" /etc/nut/upsmon.conf | grep -v "^#"')
|
||||
print("=== NOTIFY / SHUTDOWN IN UPSMON.CONF ===")
|
||||
print(stdout.read().decode())
|
||||
|
||||
ssh.close()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Reference in New Issue
Block a user