Sonarr version (exact version): 3.0.3.701
OS: Unraid (Linuxserver docker
Debug logs:
(Make sure debug logging is enabled in settings and post the full log to hastebin/pastebin/dropbox/google drive or something similar, do not post them directly here. Post in .txt not .doc, .rtf or some other formatted document)
Description of issue:
I’m trying to run a custom script but I’m failing badly. I read somewhere it needs an exit code of 0 for sonarr_eventtype but no matter what I do it keeps saying error 255.
Help please!
https://privatebin.net/?a1b8ffcf86725554#24SPRPeU5YWdNNWff37c8dCkc27mF5bXBHXaWni12B3t
#!/bin/bash
sonarr_label="tv"
base_dir=$(basename $sonarr_episodefile_sourcefolder)
test_ping=$sonarr_eventtype
if [ $sonarr_eventtype == "Test" ];then
exit 0
fi
if [ "${base_dir}" == "${sonarr_label}" ];then
echo "Single file torrent"
exit
fi
find $sonarr_episodefile_sourcefolder -name \*.r[0-9][0-9] | egrep '.*' &>/dev/null
case $? in
0)
echo "Rar files present, deleting video files"
echo `rm -rv "${sonarr_episodefile_sourcepath}"`
;;
*)
echo "No rar files, nothing to clean"
;;
esac