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

7 lines
135 B
Bash
Executable File

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