tovis wrote: > upsmon.conf using NOTIFCMD and NOTIFYFLG is working well, it is calling my > script "notify" on requested events (ONBATTERY,LOWBATTERY and ONLINE). > Command > #upsmon -c fsd -u monmaster [EMAIL PROTECTED] > > gracefully shutdown my box and after several seconds switch off the ups's > load. > > Two problems: > - notify script is called and executed as user "nut" (as it used to be > defined in nut package for Debian 4.0 Etch). To execute forced shutdown > it must be root!
Use 'sudo', with sufficient restrictions in place so that this user can only execute upsmon -c fsd as root. > - seem to be a good idea, to set "ups.delay.start" for a resonabli longer > time! Not really. In fact, this variable is implemented in the wrong way for the NUT version you now have. Since it immediately acts upon a change, this is an 'instcmd'. It should not be writeable through upsrw. This has been corrected in the 'newmge-shut' driver from nut-2.2.1pre1. Having said that, you probably should make yourself familiar with the 'One more tip' section in 'docs/shutdown.txt' which gives an option how to deal with this in a different way. Chances are however, that your UPS will provide a way to do this automatically which is better. Please post the output of 'upsc' for your UPS, so that we can see if that' supported by the driver you have now. > How to these changes? Please upgrade to a more recent version first. I have to dig deep into the old sources to help here, which is taking me too much time. If you need more help, I suggest you first upgrade to at least nut-2.2.0. Best regards, Arjen _______________________________________________ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser