Skip to content
Snippets Groups Projects
Commit f2125e07 authored by Jörg Sachse's avatar Jörg Sachse
Browse files

fix: replace inotify mechanism with infinite loop, because inotify can't...

fix: replace inotify mechanism with infinite loop, because inotify can't handle mixed mode shares, as they don't trigger inotify events.
parent 181ed532
No related branches found
No related tags found
No related merge requests found
......@@ -545,14 +545,17 @@ else
# TODO: protect DAEMON from STRG-C for clean shutdown
# echo daemon mode, use inotify to watch changes
debug "starting daemon"
scan_dir "$WATCH_FOLDER" # to clean up existing files
/usr/bin/inotifywait --monitor --recursive --event create \
--event attrib --event moved_to --format "%w%f" "$WATCH_FOLDER" \
| while read -r filename; do
debug "called inotifywait using /usr/bin/inotifywait --monitor
--recursive --event create --event attrib --event moved_to --format '%f' $WATCH_FOLDER"
scan_file "$filename"
done
while [[ 1 ]]; do
scan_dir "$WATCH_FOLDER" # to clean up existing files
sleep 10
done
# /usr/bin/inotifywait --monitor --recursive --event create \
# --event attrib --event moved_to --format "%w%f" "$WATCH_FOLDER" \
# | while read -r filename; do
# debug "called inotifywait using /usr/bin/inotifywait --monitor
# --recursive --event create --event attrib --event moved_to --format '%f' $WATCH_FOLDER"
# scan_file "$filename"
# done
debug "stopping daemon"
else
# cli mode, scan watch folder once
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment