[Nut-upsuser] Variable use in upssched-cmd

Arjen de Korte nut+users at de-korte.org
Tue Nov 4 19:49:40 UTC 2008


Citeren tarbeite <tarbeite at fit.edu>:

[...]

> I have somewhere around 12 ups¹s that the server watches and would like to
> thin out this code a little bit. Is there anyway to have UPSMON send a
> command such as a COMMBAD * and then have upssched-cmd pickup the upsname
> from the * and use it to send the approriate email.

This is described almost literally in 'man 8 upssched' and 'man 5  
upssched.conf'. The name of the UPS is passed in the environment  
variable UPSNAME and the reason in NOTIFYTYPE. In your upssched-cmd  
script you can use these variables like any other environment variable.

Best regards, Arjen
-- 
Please keep list traffic on the list



More information about the Nut-upsuser mailing list