and move mp4, mkv, avi, srt to a different folder.
I popped the script with +x into the postprocessing folder - told SABNZBD where my postprocessing folder was, and then queued up some items. They finished, the script doesnt appear to run.
The script is called move.sh - is executable, and lives in the /media/postprocessing folder in the sabnzbd jail on FreeNAS.
As you can see, it searches the sabznbd download folder for certain file types, then deletes, or moves them. It works great when run from shell. I guess my question is - how to look at logging to see why it isnt run postprocess, did i do it wrong? I've tried this both ways - using my jails mounted paths, and paths as root, in the script.
The contents of the script are as follows:
Code: Select all
find /mnt/media/Shares/Unsorted/dump/ -name "*sample*" -type f -exec rm -rf {} \;
find /mnt/media/Shares/Unsorted/dump/ -iname "*.nzb" -type f -exec rm -rf {} \;
find /mnt/media/Shares/Unsorted/dump/ -iname "*.nfo" -type f -exec rm -rf {} \;
find /mnt/media/Shares/Unsorted/dump/ -iname "*.sfv" -type f -exec rm -rf {} \;
find /mnt/media/Shares/Unsorted/dump/ -iname "*.srr" -type f -exec rm -rf {} \;
find /mnt/media/Shares/Unsorted/dump/ -iname "*.db" -type f -exec rm -rf {} \;
find /mnt/media/Shares/Unsorted/dump/ -iname "*.jpg" -type f -exec rm -rf {} \;
find /mnt/media/Shares/Unsorted/dump/ -iname "*.mkv" -type f -exec mv {} /mnt/media/Shares/Unsorted/ \;
find /mnt/media/Shares/Unsorted/dump/ -iname "*.mp4" -type f -exec mv {} /mnt/media/Shares/Unsorted/ \;
find /mnt/media/Shares/Unsorted/dump/ -iname "*.srt" -type f -exec mv {} /mnt/media/Shares/Unsorted/ \;
find /mnt/media/Shares/Unsorted/dump/ -iname "*.avi" -type f -exec mv {} /mnt/media/Shares/Unsorted/ \;