Hi,
the script /usr/local/bin/custom-upssched-cmd has an error on line 32:
32 if [ -n $(upsc $ident | grep "ups.status.*OL") ]; then33 logger -t upssched-cmd "Shutdown not initiated as ups.status indicates ${ident} is ONLINE (OL)"34 else35 logger -t upssched-cmd "issuing shutdown"36 /usr/local/sbin/upsmon -c fsd37 fi
This supposed to test if the UPS is ONLINE and then issue a shutdown if not but the "-n" in line 32 inverts the logic. Removing the "-n" fixes this.
Hi,
the script /usr/local/bin/custom-upssched-cmd has an error on line 32:
32 if [ -n $(upsc $ident | grep "ups.status.*OL") ]; then
33 logger -t upssched-cmd "Shutdown not initiated as ups.status indicates ${ident} is ONLINE (OL)"
34 else
35 logger -t upssched-cmd "issuing shutdown"
36 /usr/local/sbin/upsmon -c fsd
37 fi
This supposed to test if the UPS is ONLINE and then issue a shutdown if not but the "-n" in line 32 inverts the logic. Removing the "-n" fixes this.