Created
November 9, 2015 16:38
-
-
Save martinbowling/05b1038daaba46246973 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
#requires inotify-tools | |
#apt-get install inotify-tools | |
FOLDER="/home/plex/toupload" | |
inotifywait -m $FOLDER -e create -e moved_to | | |
while read path action file; do | |
echo "The file '$file' appeared in directory '$path' via '$action'" | |
acd_cli ul $FOLDER/"$file" /Media/Unsorted/ | |
rm -rf $FOLDER/"$file" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment