4 ms·
I'm a little confused as to why PathChanged didn't work for you. From the man page > PathChanged= may be used to watch a file or directory and activate the co
by Kluggy 3y ago
I'm a little confused as to why PathChanged didn't work for you.
From the man page
> PathChanged= may be used to watch a file or directory and activate the configured unit whenever it changes. It is not activated on every write to the watched file but it is activated if the file which was open for writing gets closed. PathModified= is similar, but additionally it is activated also on simple writes to the watched file.
PathChanged seems exactly what you want?
- chx 3y agoSorry, my recollection of the sum of all failures was not correct. PathChanged has a different problem: if you are watching a folder it would seem the name of the file is not passed from inotify(7) to the script launched by systemd. This one is outlined in great detail at https://unix.stackexchange.com/a/600686/9452 https://unix.stackexchange.com/a/600686/9452 linked from https://unix.stackexchange.com/q/600642/9452 https://unix.stackexchange.com/q/600642/9452 essentially saying "just give up".