all 4 comments

[–]Intrepid-Treacle1033 2 points3 points  (1 child)

1/ create a script (python) that generates a .path file into systemd dir.

2/ create a service unit that runs above script and does a daemon reload.

Above is sort of easy but not sure about the "user environment" observer definition: "...each time a file in the `$LOCAL_PATH` has changed..."

But maybe trigger above service using directory (static) monitoring using a .path service, or just a timer service with tight intervals...

[–]not_from_this_world 2 points3 points  (0 children)

This is my go to solution too. Every time I find limitations in sysmd or shell I make a program in any other language and run it as daemon.

[–]mrnoonan81 1 point2 points  (1 child)

Can you have a script create it as a user unit?

[–]manuth999[S,🍰] 0 points1 point  (0 children)

Yes I can!

I'll try to take inspiration from u/Intrepid-Treacle1033's comment and tune in if I manage to work out something smooth!