what's wrong in this script ?

Come up with a useful post-processing script? Share it here!
Post Reply
zoobidoo
Newbie
Newbie
Posts: 3
Joined: January 7th, 2009, 12:25 pm

what's wrong in this script ?

Post by zoobidoo »

hi guys !
i'm just a beginner with linux scrpting and bash and so on but i've wrote i little scprit to move my downloads from my download folder to another one...



===================

#!/bin/sh

ORIG=/share/Qdownload/sabnzbd/complete/Series
DEST=/share/Qmultimedia/Incoming/Series
cd $ORIG
for f in `find . -type d|grep "^.\/"`; do
        mv $f $DEST
done

==================


i'm running sabnzbd 0.4.5 on my nas (qnap 209 pro2). The problem is when the download is completed (download, repair via par2 and extraction) my script is supposed to move thes files to another folder. But instead i'm receving this prompt :

/share/Qdownload/sabnzbd/scripts/series.sh: line 8: find: command not found


obviously it doesn't seems to work

what's weird is when i lauch the script manually via a ssh session everything is just perfect.

any idea why it's not working via the script command in sab ?

thx to contributers !
rAf
Moderator
Moderator
Posts: 546
Joined: April 28th, 2008, 2:35 pm
Location: France
Contact:

Re: what's wrong in this script ?

Post by rAf »

Hi zoobidoo,

Try to chmod+x /share/Qdownload/sabnzbd/scripts/series.sh, it should work
zoobidoo
Newbie
Newbie
Posts: 3
Joined: January 7th, 2009, 12:25 pm

Re: what's wrong in this script ?

Post by zoobidoo »

that was a fast answer ! thx
unfortunately it only change the problem : now i have an other issue :

/share/Qdownload/sabnzbd/scripts/series.sh: line 8: /usr/bin/find: No such file or directory


maybe another idea ?
thank you again !
User avatar
switch
Moderator
Moderator
Posts: 1380
Joined: January 17th, 2008, 3:55 pm
Location: UK

Re: what's wrong in this script ?

Post by switch »

I'm not sure of a solution, but if I remember correctly SABnzbd on QNAP is built to run under chroot which may not have access to /usr/bin/find
zoobidoo
Newbie
Newbie
Posts: 3
Joined: January 7th, 2009, 12:25 pm

Re: what's wrong in this script ?

Post by zoobidoo »

thank you again
i'm not sure to understand what it really mean =)
so i'm also asking the same topic on qnap's forum
Post Reply