Page 9 of 10

Re: Unrar and cleanup script - UPDATE 2013.05.24

Posted: Fri Jul 26, 2013 5:57 pm
by killemov
Well, you might want to put your file names in quotes.

Code: Select all

cp -R "$SRC_DIR" "$DEST_DIR"

Re: Unrar and cleanup script - UPDATE 2013.05.24

Posted: Sat Jul 27, 2013 12:44 am
by Khabel
killemov wrote:Well, you might want to put your file names in quotes.

Code: Select all

cp -R "$SRC_DIR" "$DEST_DIR"
Tried that as well, makes no difference. If I use a hard coded variable for the destination with no spaces it works fine

Re: Unrar and cleanup script - UPDATE 2013.05.24

Posted: Wed Jan 15, 2014 11:51 am
by Scouzer
I have tried the script from the first post on page 1 on my Readynas ultra 2.
But I can't get it to work.
So I have tried to run the script manually by using bash posttorrent.sh, but I get this error:

: command not founde 3: {
: command not founde 18:
'osttorrent.sh: line 38: syntax error near unexpected token `do
posttorrent.sh: line 38: ` for RAR_FILE in $( find "$SRC_DIR" -type f -inam' "*.rar" ); do

All I have done to the script is changing the TR_USERNAME and TR_PASSWORD and also change it to $TR_TORRENT_HASH --remove at the end of the script.

Some one can help me with what I am doing wrong.

Re: Unrar and cleanup script - UPDATE 2013.05.24

Posted: Thu Jan 16, 2014 10:35 am
by killemov
Scouzer wrote:Some one can help me with what I am doing wrong.
As i posted in viewtopic.php?f=3&t=15584:
killemov wrote:I don't know if you can run this script on a vanilla ReadyNAS Ultra 2 anyway. See the prerequisites in the first post of the aforementioned thread.
This script was written for Debian. Sure it will work on many other Linux distributions. But especially for limited operating systems (NAS,router, ...) there is the possibility it will not work.

Re: Unrar and cleanup script - UPDATE 2013.05.24

Posted: Thu Jan 23, 2014 2:48 pm
by Scouzer
my Readynas ultra 2 is running Debian etch

Re: Unrar and cleanup script - UPDATE 2013.05.24

Posted: Sun Jan 26, 2014 2:40 pm
by killemov
Scouzer wrote:... I get this error:

: command not founde 3: {
: command not founde 18:
'osttorrent.sh: line 38: syntax error near unexpected token `do
posttorrent.sh: line 38: ` for RAR_FILE in $( find "$SRC_DIR" -type f -inam' "*.rar" ); do
...
I guess your version of bash is too old to be able to parse these expressions.

Re: Unrar and cleanup script - UPDATE 2013.05.24

Posted: Tue Jan 28, 2014 9:11 am
by Scouzer
Anything I can do about that?

Re: Unrar and cleanup script - UPDATE 2013.05.24

Posted: Thu Jan 30, 2014 4:21 pm
by killemov
Scouzer wrote:Anything I can do about that?
Sigh, although this has nothing to do with the unrar script and everything with your OS:
Your safest bet would be to only upgrade the bash package. (apt-get update, apt-get install bash) This may prove impossible as Debian Etch was declared End-Of-Life almost four years ago. If so, then you need to take your quest to the readynas/debian forums. Good luck!

Re: Unrar and cleanup script - UPDATE 2013.05.24

Posted: Thu Jan 30, 2014 5:26 pm
by mike.dld
Or one could rewrite the script so it supports even that "old" bash (or even other less popular shells). Just saying. Although I could spend some time on this if you wish.

Re: Unrar and cleanup script - UPDATE 2013.05.24

Posted: Sat Feb 01, 2014 9:48 am
by Merwenus
Hello,
I have 2 questions, How can I make the new (2013 may) script to extract ZIP archives, and the other when I have only flt-reme.001->flt-reme.066 files but no r01, or rar, how can I force it to extract these too?
Thank you!

Re: Unrar and cleanup script - UPDATE 2013.05.24

Posted: Wed Feb 19, 2014 7:18 am
by vmi
dtrx is a great tool for handling extraction from various archives.

Re: Unrar and cleanup script - UPDATE 2013.05.24

Posted: Wed Feb 19, 2014 3:01 pm
by Merwenus
vmi wrote:dtrx is a great tool for handling extraction from various archives.
Torrentexpander sorted it out, works better than this, ty btw.

Re: Unrar and cleanup script - UPDATE 2013.05.24

Posted: Sun Mar 09, 2014 8:49 pm
by dwardo
Hello,

I have added this script to my box and it doesn't extract any rar's. When I run the script manually I get the following error:

host:/addons-config/Transmission# bash posttorrent
posttorrent: line 28: conditional binary operator expected
posttorrent: line 28: syntax error near `=~'
posttorrent: line 28: ` if [[ "$TR_TORRENT_PARAMETER" =~ "EXIT" ]]; then'

Any help would be appreciated.

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.