Hi! On Mon, 2009-12-28 at 20:54 +0100, Arjen de Korte wrote:
> I don't understand what you mean with first and second goal. Please > make a timeline with events and what you want to happen at each point > in time. OK, I will try to put it the other way around :-) (let's assume that the UPS battery is fully charged for clarity) 1) If the power goes down but then comes back within 1-3 minutes do nothing (don't send emails etc.) 2) If the power goes down for longer then 3 minutes send a power down e-mail. 3) If the power comes back send a power back e-mail and cancel shutdown. 4) If the power does not come back and the battery is drained (in my tests in can last for ~15 minutes) shutdown the machine and hope for the best. So far I was not able to achieve this by simple means. So I settled with the following setup: # The timers, here 3 min after the ONBATT (ups on battery) event AT ONBATT * START-TIMER linedown 180 # Cancel the countdown is power is back AT ONLINE * CANCEL-TIMER linedown AT ONLINE * EXECUTE lineup It sends a power back e-mail no matter what, but probably we can live with it. Thanks! -- Sincerely yours, Yury V. Zaytsev _______________________________________________ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser