[Nut-upsuser] Variable use in upssched-cmd
Charles Lepple
clepple at gmail.com
Wed Nov 5 05:58:31 UTC 2008
On Tue, Nov 4, 2008 at 12:47 PM, tarbeite <tarbeite at fit.edu> wrote:
> Hi all
>
> I have most of the NUT system up and running. I'm in the process of writing
> the script to send email notifications for certain events. This is my
> upsshed-cmd file so far:
>
> # EC130 Commands
>
> ec130onbatt)
> echo "EC130 UPS has been on Battery for more then 10
> seconds" \
> | mailx -r "ups at fit.edu" -s"EC130 on battery"
> tarbeite at fit.edu
> ;;
> ec130combad)
> echo "Communications to EC130 UPS have degraded." \
> | mailx -r "ups at fit.edu" -s"EC130 bad Communications"
> tarbeite at fit.edu
As an aside, you can use wildcards in case statements. I think the
variables that Arjen pointed out should help, though.
--
- Charles Lepple
More information about the Nut-upsuser
mailing list