perl-5.22
Last change
on this file since fdfd619 was
c5c522c,
checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago
|
initial commit, transferred from cleaned syn3 svn tree
|
-
Property mode set to
100644
|
File size:
882 bytes
|
Line | |
---|
1 | #!/bin/bash |
---|
2 | # Syn-3 apc ups checker (C) DatuX |
---|
3 | |
---|
4 | if ! STATUS=`apcaccess | grep ^STATUS`; then |
---|
5 | syn3-state --ignorenew apcupsd ALERT "APC UPS not found!" |
---|
6 | elif echo $STATUS | grep ONLINE >/dev/null; then |
---|
7 | syn3-state apcupsd OK "UPS is online." |
---|
8 | elif echo $STATUS | grep ONBATT >/dev/null; then |
---|
9 | syn3-state apcupsd ALERT "Power failure! Running on battery!" |
---|
10 | elif echo $STATUS | grep SHUTTING >/dev/null; then |
---|
11 | syn3-state apcupsd ALERT "UPS battery almost empty, shutting down system." |
---|
12 | elif echo $STATUS | grep COMMLOST >/dev/null; then |
---|
13 | syn3-state --ignorenew apcupsd ALERT "Communication failure! Please check UPS status and cables." |
---|
14 | elif echo $STATUS | grep REPLACE >/dev/null; then |
---|
15 | syn3-state apcupsd CAUTION "UPS battery needs to be replaced!" |
---|
16 | else |
---|
17 | syn3-state apcupsd ALERT "UPS reports status: $STATUS. Please check UPS status." |
---|
18 | fi |
---|
Note: See
TracBrowser
for help on using the repository browser.