systemd.path execution timing

Latest response

I am using RHEL7 on a few machines and am trying to utilize the new systemd.path feature for an inotify implementation. It's working out rather well, but I've come across a conundrum. I have a systemd.path unit watching a folder for file changes, and it executes a systemd.service that runs for some amount of time. Say 5 to 15 seconds, depending. So if another file gets changed in that folder and it again attempts to activate the systemd.service, it is already started and so does not execute the ExecStart script. The systemd.service is set to Type=oneshot for this, so perhaps Type=simple would be better suited for this situation. Though I don't know...

Can anyone provide a better way to accomplish this? I am hesitant to give out details if none are needed, so I tried to explain it without giving as much. So if more is needed, let me know and I will provide.

Responses

Hi Rick,

I'm going to follow up to see if I can get you a response on this one.

That would be fantastic. Looking forward to it.

@David Powles, should I submit a case for this? Any updates?

Hello @all,

I would like to update this rather old topic because I have a very similar issue using systemd path units. Sadly the bugzilla (Bug 1722627) I filed for it was closed as NOTABUG. Please see the bugzilla for details.

So I guess it works as designed. But if path units are not able to catch every path event that occurs the question must be allowed whether they serve their purpose at all.

What are your opinions about this? I would like to know if you have similar use cases and problems utilizing path units for your needs.

Best regards,
Joerg