diff --git a/validate_workflow.sh b/validate_workflow.sh index 13f0524b68c8d40f940db205c082a02de721f37d..bd874193bc889c02d7bafdb8f69c3ad9aaa9818a 100755 --- a/validate_workflow.sh +++ b/validate_workflow.sh @@ -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