aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2024-07-14 20:24:27 -0300
committerSilvio Rhatto <rhatto@riseup.net>2024-07-14 20:24:27 -0300
commit629e1bfb6c0e94ea612a45ea9d1a6e158874fa9b (patch)
treeaa8871b266a7731db028b31d74adcd0251e7d1b6
parentbed5d4a438fac2dc0b2fa33d65748028a20c754b (diff)
downloadkvmx-629e1bfb6c0e94ea612a45ea9d1a6e158874fa9b.tar.gz
kvmx-629e1bfb6c0e94ea612a45ea9d1a6e158874fa9b.tar.bz2
Fix: kvmx: inotify: restrict events
-rwxr-xr-xkvmx13
1 files changed, 12 insertions, 1 deletions
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
}