On 05/01/2013, at 1:23, Thomas Laus <lau...@acm.org> wrote: > I want to send an email to my cellphone only for significant UPS events that > involve starting the generator and want to ignore short duration events. > > My upssched.conf: > > CMDSCRIPT /usr/local/bin/upssched-cmd > PIPEFN /var/db/nut/upssched/upssched.pipe > LOCKFN /var/db/nut/upssched/upssched.lock > AT ONBATT * START-TIMER upsbatt 30 > AT ONLINE * CANCEL-TIMER upsbatt > AT LOWBATT * EXECUTE ups-low-batt > > My CMDSCRIPT /usr/local/bin/upssched-cmd: > > #!/bin/sh > > case $1 in > upsbatt) > echo "The UPS has been on battery for awhile" \ > | mail -s"UPS monitor" me@testhost.local > ;; > ups-low-batt) > echo "The UPS has a low battery condition" \ > | mail -s"UPS monitor" me@testhost.local > ;; > *) > logger -t upssched-cmd "Unrecognized command: $1" > ;; > esac > > I tested the configuration last week before deployment by pulling the plug on > the UPS. The syslog and wall notify commands work, but no email was > generated nor any entries in my maillog.
What about if you use the full path for mail? I don't know about the environment used - if it is very restrictive the mail executable might not be found. -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser