Page 10 of 10

Re: Unrar and cleanup script - UPDATE 2013.05.24

Posted: Sun Mar 09, 2014 11:58 pm
by dwardo
It appears that I may not have the required version of bash, and may not be able to upgrade it. I am running transmission on my Readynas NV+ firwmare 4.1.13:

host :/addons-config/Transmission# bash --version
GNU bash, version 2.05b.0(1)-release (sparc-unknown-linux-gnu)
Copyright (C) 2002 Free Software Foundation, Inc.

Can anybody suggest an alternative to "=~" in the script for me?

Thanks

Re: Unrar and cleanup script - UPDATE 2013.05.24

Posted: Thu Apr 09, 2015 5:50 am
by killemov
I guess you do need a newer version of busybox.

Re: Unrar and cleanup script - UPDATE 2013.05.24

Posted: Fri May 08, 2015 12:10 am
by hahaha
Hi Killemov,
Thanks for the script, haven't implemented it yet but it seems nice.
quick one I hope, if I wanted a longer sleep time, should I modify this line and put xxh instead of 1h ?

TR_TORRENT_PARAMETER="EXTRACT SLEEP1h"

Also, where in the script would you put a command that you want executed for every torrent (in that case trigger a library update on a remote xbmc) after the extract but before the sleep ?

Re: Unrar and cleanup script - UPDATE 2013.05.24

Posted: Fri May 08, 2015 5:27 am
by killemov
hahaha wrote:Hi Killemov,
Thanks for the script, haven't implemented it yet but it seems nice.
quick one I hope, if I wanted a longer sleep time, should I modify this line and put xxh instead of 1h ?

TR_TORRENT_PARAMETER="EXTRACT SLEEP1h"

Also, where in the script would you put a command that you want executed for every torrent (in that case trigger a library update on a remote xbmc) after the extract but before the sleep ?
TR_TORRENT_PARAMETER="EXTRACT SLEEP2h"

And yes, but that would work for rar archives only. All other file types would be ignored anyway.

Re: Unrar and cleanup script - UPDATE 2013.05.24

Posted: Fri May 08, 2015 7:59 pm
by hahaha
Hey thanks for the advice

I'm trying to implement the script and running into a weird behaviour:
I ran a torrent with a ssh open on the server, and I get a lot of output in the console:

first a lot of these, all over the place, not only in the download folder
find: `/var/log/gdm3': Permission denied
Then extracting a random rar file, still not in the same folder:
Extracting from /mnt/raid5-6to/Films/.../random_rar_file.rar
the extracting fails, and then:
./posttorrent.sh: line 53: /var/log/posttorrent.log: Permission denied
then there is a transmission-remote call with invalid options that displays the man
and finally:
No torrent specified! Please use the -t option first.
localhost:9091/transmission/rpc/ responded: "success"
No torrent specified! Please use the -t option first.
localhost:9091/transmission/rpc/ responded: "success"

So the underlying issue seems to be permissions but not sure why the script would try to extract random stuff.
I used the 1st page script and modified username, password, DEST_DIR="$SRC_DIR", and commented the --remove-and-delete line, that's all

Any advice ?

Re: Unrar and cleanup script - UPDATE 2013.05.24

Posted: Sun May 10, 2015 11:54 am
by hahaha
Hi,
On an update on my troubles, I think I identified the cause:
It seems the transmission environment variables are not set.
Additionally it seems weird that the output of the script shows up in my open console, and it would make sense that in my console the variables are not set. Do you have an idea of why it is behaving that way ?

Thanks

Re: Unrar and cleanup script - UPDATE 2013.05.24

Posted: Sat Mar 26, 2016 2:15 pm
by killemov
Note that the script will be executed by the same user that runs the transmission daemon. And that implies running all the commands in the script for the same user as well.

Re: Unrar and cleanup script - UPDATE 2013.05.24

Posted: Thu Feb 07, 2019 6:13 pm
by aspoels
Im having trouble getting this to work for me on ubuntu 18 with transmission 2.92..... also- is there a way to have the script unpack the files right into the preexisting torrent folder with the rar files?

Re: Unrar and cleanup script - UPDATE 2013.05.24

Posted: Fri Feb 08, 2019 12:46 am
by killemov
That is what's supposed to happen. If you echo the values from these variables (TR_TORRENT_DIR and TR_TORRENT_NAME) you might get an idea of what is going wrong.

Re: Unrar and cleanup script - UPDATE 2013.05.24

Posted: Fri Sep 11, 2020 12:02 pm
by rishioo7
Alright, this recommends the content is, in any event, ready to run on your framework and that unrar is called. The difficulty despite everything is that the content isn't called from the transmission. In the event that you have (triple!)checked for the legitimate setup of the settings.json document and the content is in the right spot with the right name ("feline/mnt/information/Torrents/extract.sh" shows the substance of the content), at that point I'm out of thoughts.