Roger, Manuel,

Thanks very much for your helpful replies. Confirms I haven’t missed anything 
in nut-monitor and I need to use systemd. What I was looking for was a direct 
way to run a script but putting it in a service is a good idea that I had 
missed. Much appreciated.

Regards, Philip.

> On 18 Feb 2022, at 10:10, Manuel Wolfshant <[email protected]> wrote:
> 
> On 2/18/22 11:12, Roger Price wrote:
>> On Fri, 18 Feb 2022, Manuel Wolfshant wrote:
>> 
>>> On February 18, 2022 12:41:39 AM GMT+02:00, Philip Taylor 
>>> <[email protected]> wrote:
>>>> I’m wanting to run a bash script after upsmon starts. I can see it’s easy 
>>>> to run a script on any notification AFTER upsmon has started using 
>>>> NOTIFYFLAG; but I’m struggling to find how to run a script on the event of 
>>>> upsmon starting to run. Am I missing something obvious?
>>> 
>>> You should do that via the  mechanism used by your distribution to manage 
>>> services.  For instance, if it is using systemd, you would create a service 
>>> unit for your script and include inside it "After upsmon.service"
>> 
>> I would cheat and put a second ExecStart in nut-monitor.service, but that's 
>> cheating.
> 
> It's not cheating if it works. But that would start the script in the same 
> time with upsmon, not after.
> 
> 
> Manuel
> 
> 
> _______________________________________________
> Nut-upsuser mailing list
> [email protected]
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser


_______________________________________________
Nut-upsuser mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser

Reply via email to