From: Silvio Rhatto Date: Sun, 14 Jul 2024 23:24:27 +0000 (-0300) Subject: Fix: kvmx: inotify: restrict events X-Git-Tag: 0.3.0~26 X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=629e1bfb6c0e94ea612a45ea9d1a6e158874fa9b;p=kvmx.git Fix: kvmx: inotify: restrict events --- diff --git a/kvmx b/kvmx index e912f84..b5098ea 100755 --- a/kvmx +++ b/kvmx @@ -2582,8 +2582,19 @@ function kvmx_inotify { exit 1 fi + # Exclude "access", "close", "close_write", "close_nowrite", "open" from the list of events + local args + local event + local events="modify attrib moved_to moved_from move" + events="$events move_self create delete delete_self unmount" + + # Build arg list of events + for event in $events; do + args="$args -e $event" + done + # Dispatch - while inotifywait -r $watched; do + while inotifywait $args -r $watched; do echo "$command" | kvmx_ssh done }