oops
This commit is contained in:
parent
60427c950a
commit
592cdd2b40
@ -92,7 +92,7 @@ def main():
|
||||
|
||||
shutdown_status = run_command('shutdown --show')
|
||||
|
||||
if (state == "on-battery") and (time_on_battery > TIME_THRESHOLD) and ("No scheduled shutdown" in shutdown_status):
|
||||
if (state == "on-battery") and (time_on_battery < TIME_THRESHOLD) and ("No scheduled shutdown" in shutdown_status):
|
||||
print("UPS is failing, shutting down in 60 seconds...", flush=True)
|
||||
send_email(f"{socket.gethostname()}@vvzvlad.xyz", "UPS is failing, shutting down in 60 seconds...",
|
||||
f"Proxmox node '{socket.gethostname()}': UPS is failing, shutting down in 60 seconds...",
|
||||
|
Loading…
Reference in New Issue
Block a user