Created
May 10, 2020 20:19
-
-
Save gene1wood/286c02b9894b5fa4276e66a7f3101bf3 to your computer and use it in GitHub Desktop.
Script to create inotifywait on directories to trigger Subsonic media scanning
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
dirs="/path/to/first/dir /path/to/second/dir /path/to/third/dir" | |
act="/usr/local/bin/act-on-new-media.bash" | |
# act="cat" | |
/bin/inotifywait --monitor --recursive --quiet --format '%w' --event create,moved_to $dirs | while read f | |
do | |
$act "$f" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment