I have code like this to trigger a script in /etc/inittab:
until test -p /tmp/updates.pipe
do
sleep 0.25
done
Which I want to refactor since the sleep
floods debug logs, when debugging with set -x
.
IIUC inotifywait
only watches on directories.
inotifywait -e create /tmp
So how do I make it only proceed after seeing the CREATE event of the /tmp/updates.pipe file, and not any other file in /tmp
?