On January 11, 2022 4:02:52 PM GMT+02:00, Roger Price <ro...@rogerprice.org> 
wrote:
>On Tue, 11 Jan 2022, Manuel Wolfshant wrote:
>
>> On 1/11/22 11:46, Eyal Lebedinsky wrote:
>>> Jan 11 19:29:19 e7.eyal.emu.id.au upsdrvctl[1610]: Driver failed to start 
>>> (exit status=1) 
>>
>> Here is your culprit, the UPS is not seen in the moment the driver tries to 
>> talk with it. Use a monotonic timer to delay the start of the service by, 
>> say, 20 secs or so.
>>
>> https://www.freedesktop.org/software/systemd/man/systemd.timer.html
>
>I looked at this file, and then looked for examples.  They all seem to talk 
>about cron like activity. 
That is one of the two types of usage.


> It would be interesting to see an example of "wait 
>until service has started, with max of 20sec"
That is what monotonic timers do. Basically you create the .timer unit file 
with the same name as the service, add the relevant content as described in the 
man page, enable it and disable the main service.


>
>Would it be possible to avoid systemd timers by adding 
>"ExecStartPre=/bin/sleep 
>20" in the [Service] section of nut-server.service?
It is but it is uglly.


>
>Roger
>
>_______________________________________________
>Nut-upsuser mailing list
>Nut-upsuser@alioth-lists.debian.net
>https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser


_______________________________________________
Nut-upsuser mailing list
Nut-upsuser@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser

Reply via email to