Update service.py

This commit is contained in:
gunu3371 2024-07-14 01:48:24 +09:00 committed by GitHub
parent 7855f04eed
commit 7a5a74fe33
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -119,9 +119,9 @@ while not killer.kill_now:
log.warn('AC power loss')
pw = int(ups.get_curvol())
if pw <= 3500:
log.crit('battery is too low Shut down system')
ups.shutdown()
os.system("shutdown now")
log.crit('battery is too low Shut down system')
elif pw <= 3650:
log.crit('battery is too low')
elif pw <= 3800: