Kapisi/roles/Sharingan/files/monit/scripts/check-cyberpower

7 lines
135 B
Plaintext
Raw Permalink Normal View History

2023-12-21 12:58:32 -06:00
#!/bin/bash
if [ `pwrstat -status | sed 's/^\s\+//' | grep -E ^State | awk '{ print $2; }'` != 'Normal' ]; then
exit 2;
fi
exit 0