Page 1 of 1

scripts stopped working

Posted: February 27th, 2022, 10:51 pm
by fandangos
Hi,

I've been using sabnzbd for years now and I always have a script for Movie content that calls a rclone binary and copy my movies to the cloud.
This worked fine for years and now it stopped working.

I'm running SAB on a docker container inside Unraid.

it's a very simple script that I'm omiting the sensitive part

Code: Select all

#!/bin/bash
/script/rclone copy /download/Movies remote:
out of the blue ./script/rclone: No such file or directory

things I tried:
1. copying the executable to /usr/bin making it available system wide and using rclone without ./
2. using #!/bin/sh
3. using ./ to call the executable
4. using just /script/executable

The script is chmod +x and chmod 777, the same goes for the executable.

So my question is: what did you guys change? It has to be a less than 7 day commit that broke scripts calling binaries.

EDIT: forgot to mention, version is the one I'm using 3.5.1

Re: scripts stopped working

Posted: February 28th, 2022, 12:50 am
by sander
So my question is: what did you guys change? It has to be a less than 7 day commit that broke scripts calling binaries.
If you think that is the cause, go back to a previous sab / docker image version, for example 3.5.0

Re: scripts stopped working

Posted: February 28th, 2022, 7:37 am
by fandangos
My bad, it's not the version.
Reverted back to 3.4.2 and the problem persists.

this is the output I get from sab:

Code: Select all

/script
copy_movies dot sh
rclone
rclone dot conf
rclone: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64 dot so dot 2, BuildID[sha1]=1fe815462ea34b68feeaf88d275e41f0181aa543, for GNU/Linux 3 dot 2 dot 0, not stripped
/script/copy_movies dot sh: line 7: rclone: command not found

Code: Select all

#!/bin/bash
cd /script
echo $PWD
ls
file rclone
which rclone
rclone move /downloads/MOVIES/ "remote:folder" --drive-chunk-size 256M -v --config /script/rclone dot conf
do you have any suggestion to what might be causing this?

Had to change the . to dot in text so I can post or the forum thinks I'm posting a link.

Re: scripts stopped working

Posted: February 28th, 2022, 7:49 am
by sander
rclone in current directory, but not in PATH?

Re: scripts stopped working

Posted: February 28th, 2022, 8:02 am
by fandangos
sander wrote: February 28th, 2022, 7:49 am rclone in current directory, but not in PATH?
yes.
rclone is a binary in current directory.
I copied the binary to /usr/bin so it's available all the time but still the same file not found.

Re: scripts stopped working

Posted: February 28th, 2022, 9:25 am
by fandangos
Just wanted to do a follow up to this.

I have absolute no idea what is going on here.

I use the "app store" inside unraid and I was using linuxserver/sabnzbd, switching to binhex/arch-sabnzbd solved my problem and the script is working again.

Why? I have no idea.

running linuxserver/sabnzbd with the same script gives me a very weird error now.
it gives a file not found error, don't copy the content with rclone BUT it gives an empty output from rclone.
It's the weirdest thing I ever seen and I can't figure what happened but I got a workaround now.