[Nut-upsuser] Is a timer a file?
Roger Price
roger at rogerprice.org
Sun Jun 5 10:34:36 UTC 2016
On Sat, 4 Jun 2016, Charles Lepple wrote:
> On Jun 3, 2016, at 6:48 AM, Roger Price <roger at rogerprice.org> wrote:
>> ... the timer. I don't see it in /var/lib/ups where the locate tool
>> finds upsd.pid, and I don't see it in /run or /var/run where I see
>> upsmon.pid.
>>
> ... it seems that the timers are only stored in memory. See
> checktimers():
> https://github.com/networkupstools/nut/blob/master/clients/upssched.c#L129
Hello Charles, thanks for the link. If timers are only stored in memory
then the example given at
http://networkupstools.org/docs/user-manual.chunked/ar01s07.html chapter
7.2 is wrong. It is not possible to turn off a timer with rm as shown in
#! /bin/sh
case $1 in
...
ups-back-on-power)
/bin/rm -f /some/path/ups-on-battery
;;
...
esac
This would explain the problem I have with a current script.
Is there some other way of forcing routine cancel_timer from a script or a
configuration file?
Roger
More information about the Nut-upsuser
mailing list