Extracting locally, then moving to cloud "Cannot run script"

Come up with a useful post-processing script? Share it here!
Post Reply
trsthr
Newbie
Newbie
Posts: 6
Joined: November 24th, 2020, 4:34 pm

Extracting locally, then moving to cloud "Cannot run script"

Post by trsthr »

Hi i tried different settings in Sabnzbd, but either way the files are stored locally and i have to move them manually or the rar are uploaded to the cloud, then downloaded again to unrar and then the result is uploaded again.

So i guess a super simple post processing script would do the job, but i am having troubles:

I created a moveDOTsc script in my script folder (linux):

Code: Select all

mv -fv "$1" "LOCATION/$3"
which should move my files to this LOCATION, where my cloud is mounted in a folder with the name of the download.
But Sabnzbd gives me: Cannot run script moveDOTsc

Here is the log:

#Next Post, had problems with new users and some dots

What am i missing?
Last edited by trsthr on November 24th, 2020, 4:50 pm, edited 2 times in total.
trsthr
Newbie
Newbie
Posts: 6
Joined: November 24th, 2020, 4:34 pm

Re: Extracting locally, then moving to cloud

Post by trsthr »

Code: Select all

2020-11-24 22:14:08,969::INFO::[newsunpack:269] Unrar finished on /mnt/Usenet/tmp/uTXaV6ExQeg3278
2020-11-24 22:14:08,977::INFO::[postproc:426] Unpacked files [ STUFF ]  
2020-11-24 22:14:08,978::INFO::[postproc:431] Finished unpack_magic on uTXaV6ExQeg3278
2020-11-24 22:14:09,005::INFO::[misc:988] [N/A] Running external command: ['MOVESCRIPT', '/mnt/Usenet/uTXaV6ExQeg3278', 'uTXaV6ExQeg3278{{PW}}.nzb', 'uTXaV6ExQeg3278', '', 'cip', 'alt.binaries.ftwclub', '0', '']
2020-11-24 22:14:09,061::INFO::[nzbstuff:1789] [N/A] Purging data for job uTXaV6ExQeg3278 (delete_all_data=True)
2020-11-24 22:14:09,063::INFO::[notifier:122] Sending notification: Download fertig - uTXaV6ExQeg3278 (type=complete, job_cat=cip)
2020-11-24 22:14:09,199::INFO::[database:290] Added job uTXaV6ExQeg3278 to history
2020-11-24 22:14:09,200::INFO::[postproc:134] Saving postproc queue
2020-11-24 22:14:09,201::INFO::[downloader:310] Post-processing finished, resuming download
2020-11-24 22:14:13,202::INFO::[nzbqueue:225] Saving queue
2020-11-24 22:14:13,205::INFO::[postproc:134] Saving postproc queue
2020-11-24 22:14:13,206::INFO::[notifier:122] Sending notification: SABnzbd - Warteschlange abgearbeitet (type=queue_done, job_cat=None)
User avatar
sander
Release Testers
Release Testers
Posts: 9070
Joined: January 22nd, 2008, 2:22 pm

Re: Extracting locally, then moving to cloud

Post by sander »

Executing bit not set?
Not runnable?

What is the exact message (in German, I suppose)? I don't see it in your log.
trsthr
Newbie
Newbie
Posts: 6
Joined: November 24th, 2020, 4:34 pm

Re: Extracting locally, then moving to cloud

Post by trsthr »

Permissions are 777, don't know how i could check if it is runnable because of those parameters (except for moving those files manually, which works)

Exact error in Sabnzbd is: Cannot run script /mnt/Usenet/tmp/Scripts/moveDOTsc

Thank you for your fast reply :)
User avatar
sander
Release Testers
Release Testers
Posts: 9070
Joined: January 22nd, 2008, 2:22 pm

Re: Extracting locally, then moving to cloud

Post by sander »

What if you run from the command line

/mnt/Usenet/tmp/Scripts/move.sc

?
trsthr
Newbie
Newbie
Posts: 6
Joined: November 24th, 2020, 4:34 pm

Re: Extracting locally, then moving to cloud

Post by trsthr »

mv: cannot stat '': No such file or directory

I guess it does not know what to do with $1 or $3
User avatar
sander
Release Testers
Release Testers
Posts: 9070
Joined: January 22nd, 2008, 2:22 pm

Re: Extracting locally, then moving to cloud

Post by sander »

OK, that's good. On the CLI, provide parameter 1, 2 and 3, and try again.
User avatar
sander
Release Testers
Release Testers
Posts: 9070
Joined: January 22nd, 2008, 2:22 pm

Re: Extracting locally, then moving to cloud

Post by sander »

Exact error in Sabnzbd is: Cannot run script /mnt/Usenet/tmp/Scripts/moveDOTsc
"Cannot run script" is not a text in SABnzbd ...
trsthr
Newbie
Newbie
Posts: 6
Joined: November 24th, 2020, 4:34 pm

Re: Extracting locally, then moving to cloud

Post by trsthr »

Image
This is a screenshot from my Sabnzbd 3.1.0RC1
Edit: Still there after upgrade to 3.1.1

What do you mean by provide the parameters in CLI? Should i fill them in manually?
User avatar
sander
Release Testers
Release Testers
Posts: 9070
Joined: January 22nd, 2008, 2:22 pm

Re: Extracting locally, then moving to cloud

Post by sander »

trsthr wrote: November 24th, 2020, 6:13 pm

What do you mean by provide the parameters in CLI? Should i fill them in manually?
Yes. As I test.
And change extension to .sh
trsthr
Newbie
Newbie
Posts: 6
Joined: November 24th, 2020, 4:34 pm

Re: Extracting locally, then moving to cloud

Post by trsthr »

Thanks for your help!
It were the windows line endings, that prevented it from execution.
User avatar
sander
Release Testers
Release Testers
Posts: 9070
Joined: January 22nd, 2008, 2:22 pm

Re: Extracting locally, then moving to cloud

Post by sander »

trsthr wrote: November 25th, 2020, 5:45 am Thanks for your help!
It were the windows line endings, that prevented it from execution.
Oh my ......
User avatar
sander
Release Testers
Release Testers
Posts: 9070
Joined: January 22nd, 2008, 2:22 pm

Re: Extracting locally, then moving to cloud "Cannot run script"

Post by sander »

TIL "Cannot run script" is a sign there is something wrong with the script itself.
Post Reply