250fea8679
The tracked copy was a stale pre-refactor version (no sequential-test
safety, no textfile metric). Replace with the current script plus fixes
for the UPSBatteryTestFailed false alarm:
- Poll ups.test.result until terminal ("passed"/"failed") instead of a
single racy read — CyberPower updates the string slower than the OL
transition, which recorded 0 despite a passing test.
- to_gauge matches *passed* substring, not exact "Done and passed".
- Fix cron OR-logic: setting both DOM (1-7) and DOW (0) made cron run on
EITHER (daily Jul 1-7 + Sundays). Script now self-guards to day<=7;
cron fires every Sunday of the quarter months.
- Externalize NUT_PASS to /etc/ups-quarterly-test.env (root:600) so the
password is no longer embedded in the repo. Deploy via ups-fix.sh.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>