[Nut-upsuser] Running a script after UPSMON starts

Manuel Wolfshant wolfy at nobugconsulting.ro
Fri Feb 18 01:26:18 GMT 2022

On February 18, 2022 12:41:39 AM GMT+02:00, Philip Taylor <philip at kelsotowers.co.uk> 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"


More information about the Nut-upsuser mailing list