Pyload Says:
ERROR ExternalScripts: Error in run.sh: [Errno 2] No such file or directory
run.sh located in:
/var/packages/pyload/target/pyload/module/plugins/unrar_finished/run.sh
I have no idea why my script won't work. My Shell Script skill is very bad

Code: Select all
#!/bin/bash
# Globale Variablen #
DATE=$(date +%d.%m.%Y\ %H:%M:%S)
DownloadDir=/volume1/video/Download
MediaDir=/volume1/video/
logline=$(date +'%d.%m.%Y')" "$(date +'%H:%M:%S')" FileBot"
LogFile=/volume1/@appstore/pyload/var/config/Logs/log.txt # LogFile
#Pyload
DownloadFolder=$MediaDir/$1
SERVICE=unrar
SERVICE2=filebot
#FileBot-defs
MovieFormat="movieFormat=Movies/{net.sourceforge.filebot.WebServices.TMDb.getMovieInfo(movie, Locale.GERMAN).name} {'('+y+')'}/{net.sourceforge.filebot.WebServices.TMDb.getMovieInfo(movie, Locale.GERMAN).name} {'('+y+')'}"
Ignore="ignore=\b(?i:doku)\b"
Extras="clean=y artwork=n"
echo -e "$logline ##########################" | tee -a $LogFile
echo -e "$logline ............unrar_finished" | tee -a $LogFile
x=1
while (ps ax | grep -v grep | grep -v $0 | grep $SERVICE > /dev/null && [ $x -le 20 ])
do
echo -e "$logline $SERVICE still running ...WAITING..." | tee -a $LogFile
sleep 10
x=$(( $x + 1 ))
done
y=5
while (ps ax | grep -v grep | grep -v $0 | grep $SERVICE2 > /dev/null && [ $y -le 2 ])
do
echo -e "$logline $SERVICE2 already running ..wait 60 secs" | tee -a $LogFile
sleep 60
y=$(( $y + 1 ))
done
if (ps ax | grep -v grep | grep -v $0 | grep $SERVICE > /dev/null || ps ax | grep -v grep | grep -v $0 | grep $SERVICE2)
then
echo -e "$logline $SERVICE2 or $SERVICE still running - ABORT" | tee -a $LogFile
exit
else
# Funktionen #
sortiere(){
filebot -script fn:amc "$DownloadFolder" --output "$MediaDir" --conflict override -non-strict --action move --def "$MovieFormat" "$Ignore" $Extras
}
cleaning(){
filebot -script fn:cleaner "$DownloadFolder" --def root=y "$Ignore" "exts=jpg|nfo|rar|etc" "terms=sample|trailer|etc"
}
# Ausfuehren #
# Execute the functions#
echo -e "$logline sorting Files with Filebot" | tee -a $LogFile
sortiere
echo -e "$logline cleaning Clutter with Filebot" | tee -a $LogFile
cleaning
#echo -e "$logline XBMC clean" | tee -a $LogFile
#xbmc_clean
#echo -e "$logline XBMC scan" | tee -a $LogFile
#xbmc_scan