mirror of
https://github.com/janeczku/calibre-web
synced 2024-11-01 07:36:20 +00:00
Fix script to work with subfolders
parent
71bd8127ce
commit
557958285e
@ -58,10 +58,10 @@ add_to_calibre() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Monitor the folder for new files
|
# Monitor the folder for new files
|
||||||
inotifywait -m -e close_write,moved_to -e moved_to "$WATCH_FOLDER" |
|
inotifywait -m -r --format="%e %w%f" -e close_write -e moved_to "$WATCH_FOLDER" |
|
||||||
while read -r directory events filename; do
|
while read -r events filepath; do
|
||||||
echo "New file detected: $filename"
|
echo "New file detected: $filepath"
|
||||||
add_to_calibre "$filename"
|
add_to_calibre "$filepath"
|
||||||
done
|
done
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user