This makes no sense for a couple of reasons:
- Why waste your (and your cpu) time polling and parsing syslogs while you may also run into mismatches or overridden entries, when the daemon provides an interface that has the info he needs right out of the gate?
- The project hasn't been updated for 5 years (with the latest stable being from 2016), but why does it matter, if he is going to use it anyway? The execute_command function is just some POSIX syscalls (fork and execv in OpenWrt), like syslog, that are not going to be affected by the lack of updates. You can read up the function at src/lib/apcexec.c, any unsafe code will be coming from your shell script (or another program type) being executed.
From what I could understand, he just needs something like this in his apccontrol
:
[ "$1" = "onbattery" ] && echo "..." | msmtp -t --account ups
http://www.apcupsd.org works fine for me and redirects to the project's SourceForge repository. Was it supposed to point elsewhere?