Torrentwatch(-x) anyone?

Questions regarding modifying the torrent engine or download station may go here.
Forum rules
Please note the disclaimer before modifying your Synology Product.

Re: Torrentwatch(-x) anyone?

Postby dash7 » Wed Oct 27, 2010 11:37 pm

bryson_ac wrote:but apparently running transmission under admin uses up a lot of resources? autostarting transmission is flawless? guess i give it a second look, then.


I did come across this autostart script as well... but I haven't tried it yet. I think now that the NAS actuall spins down when not used I won't really turn it off very often and I sure hope it doesn't crash a lot...

As for the resources: if you want to compare them I started those six downloads simultaniously ( found here: http://www.ubuntu.com/desktop/get-ubunt ... ownload#bt)
Ubuntu 10.10
ubuntu-10.10-alternate-amd64.iso.torrent
ubuntu-10.10-alternate-i386.iso.torrent
ubuntu-10.10-desktop-amd64.iso.torrent
ubuntu-10.10-desktop-i386.iso.torrent
ubuntu-10.10-server-amd64.iso.torrent
ubuntu-10.10-server-i386.iso.torrent

After a couple of minutes downloading I get:
transmission-da at 15%-21% CPU-load
transmission-da at 12040kB Memory

Are there major differences?

Thanks again to get this thing working!
cheers,
dash
dash7
Trainee
Trainee
 
Posts: 10
Joined: Thu Oct 21, 2010 8:18 pm

Re: Torrentwatch(-x) anyone?

Postby dash7 » Wed Oct 27, 2010 11:47 pm

bryson_ac wrote:in your config you're actually switching between "/web/tw"and "/web/torrentwatch" is that intentional?


Yes, I did this because of the instruction on the torrentwatch-x page ( http://code.google.com/p/torrentwatch-x ... stallation )

They say:
Create a directory '/etc/torrentwatch' and make sure the web server can write there. Or edit config.php and change the location to your wishes, beware to keep the config file out of the webroot as it holds the torrent clients password.

Now I don't know if I got this right but it seems that they advise not to put the torrentwatch.config file in the same directory as the rest of the torrentwatch files? So I didn't put the config file in the same directory as the other torrentwatch files. However its still in the web-folder..don't if this is a security issue....
dash7
Trainee
Trainee
 
Posts: 10
Joined: Thu Oct 21, 2010 8:18 pm

Re: Torrentwatch(-x) anyone?

Postby bryson_ac » Thu Oct 28, 2010 9:38 am

right. i just figured as the password is crypted and i wanted to have everything torrentwatch under the same folder tree i just did it the way posted. concerning webroot, that's been set with the dsm function webserver resp. virtual host, and i might think you did set "/web/torrentwatch" there - so with your given setting you should be save, i guess. nonethess, about security issues in general - and not actually knowing better - my nas can not be reached from the outside, except of course from the torrent ports needed, and there is no further webserver e.g. running on it. to me, the real threat would be transmission - that is in the first place why i set it to run under a specific user, and not as admin resp. root. but to be honest, i'm not quite familiar yet with security and what, why, how here.

i'll see for changing to the ipkg version tonite - let's see then about the transmission-remote.

cheers, bry
bryson_ac
Trainee
Trainee
 
Posts: 15
Joined: Thu Oct 07, 2010 8:57 am

Re: Torrentwatch(-x) anyone?

Postby Putchuco » Mon Nov 01, 2010 7:08 pm

Stumbled upon your discussion/work here. I have been using Transmission and Torrentwatch on my PCH-A110 (NMT) for 2 years and would love to configure a similar thing on my 410j, just like you guys have been getting to.
Is there a chance you could get the current status to a state where a non-programmer like me can install/configure it?

Thx much for your consideration and the great groundwork.
Putchuco
I'm New!
I'm New!
 
Posts: 2
Joined: Mon Nov 01, 2010 5:07 pm

Re: Torrentwatch(-x) anyone?

Postby bryson_ac » Wed Nov 03, 2010 11:52 am

hi putchuco,

that's pretty much the same where i came from: pch-a200. well - to be honest, i had no "programming" experience before this here either - but it's actually only editing scripts, and pretty much self explaining. give it a try, that's how i did it ... and in case you stumble upon difficulties: just ask.

@dash

i switched the transmission package to zebulon's, found here: http://synoblog.superzebulon.org/category/transmission/ - it can be run under a specific user, which i actually consider "safer" than running it under "root". it's up-to-date with 2.11 and comes with all the utilities, including transmission-remote. having said that: you're "remove" script works just fine, thanks! am trying now to include a "unrar" and "email notification upon completion" part ... we'll see how that goes.

cheers, bry
bryson_ac
Trainee
Trainee
 
Posts: 15
Joined: Thu Oct 07, 2010 8:57 am

Re: Torrentwatch(-x) anyone?

Postby dash7 » Wed Nov 03, 2010 8:16 pm

bryson_ac wrote:i switched the transmission package to zebulon's, found here: http://synoblog.superzebulon.org/category/transmission/ - it can be run under a specific user, which i actually consider "safer" than running it under "root". it's up-to-date with 2.11 and comes with all the utilities, including transmission-remote.

thanks for the link! I'll take a look at this.
however i'd love if anyone with more expertise in this area could explain to us if running transmission as root is a real danger or problematic in any way.

bryson_ac wrote:having said that: you're "remove" script works just fine, thanks! am trying now to include a "unrar" and "email notification upon completion" part ... we'll see how that goes.

I might be able to help here. The script I used to remove the torrents originally included such functionality. All I needed was the part that removes the torrents ("transmission-remote -n name:password -t$TR_TORRENT_ID --remove &") as I don't d/l rar-files. Heres the complete script (which I did not test):

Code: Select all
#! /bin/sh
cd $TR_TORRENT_DIR
if [ -d "$TR_TORRENT_NAME" ]
then
  if ls "$TR_TORRENT_NAME"/*.rar > /dev/null 2>&1
  then
    find "$TR_TORRENT_NAME" -iname "*.rar" | while read file
    do
      unrar x -inul "$file"
    done
    transmission-remote -n name:password -t$TR_TORRENT_ID --remove &
    echo "Unrarred" $TR_TORRENT_NAME >> /var/log/posttorrent.log
  fi
fi

I don't think the unrar package is installed by default but it certainly can be found with ipkg.

Finally I found the reason why I kept getting this error about the missing permissions to the Transmission-Session-Id file.
This file is being created by torrentwatch-x. The way the permissions are set on this file is determined by the tor_client.php script.
Line 50 of this file reads:
Code: Select all
if($platform == 'NMT') chmod($sessionIdFile, 0666);

However there is no chmod command in this script for the case that the platform is NOT set to be "NMT" (what kind of platform torrentwatch-x thinks its dealing with is set in the config.php file and the platform.php file).
So all I did was to change line 50 in the tor_client.php file to this:
Code: Select all
if($platform != 'NMT') chmod($sessionIdFile, 0666);

This way the permissions are set the right way and the webserver user has access to the file. (might be different for other versions of torrentwatch-x. I have 0.6.5 beta2)

bry, how are you going to deal with DSM updates? Did you install the lastest update (DSM 3.0-1354)? Am not sure if I should as it changes the php-version and theres no going back to the older version if things end up broken...

cheers,
dash
dash7
Trainee
Trainee
 
Posts: 10
Joined: Thu Oct 21, 2010 8:18 pm

Re: Torrentwatch(-x) anyone?

Postby bryson_ac » Thu Nov 04, 2010 11:40 am

yes, that's actually the same unrar/remove script i found and started to work from - thanks! luckily unrar is implemented natively, so i pretty much got it to work already: but still trying to adapt it to my needs.

interesting though, speaking of the "Transmission-Session-Id": that's the reason then why i actually never ran in that error - making torrentwatch believe it's indeed running on an nmt in the first place: so yet another miracle explained.

concerning the DSM 3.0: I'm still on the -1334 - but the torrentwatch-x changelog claims for the 0.6.5 (RC1) that:

Really fixed php 5.3.x problems.


so, if for the -1354:

PHP is upgraded to 5.3.3.


it should work?

i've actually no upgrade experience on the synolog at all - do you?
how will it behave in terms of ipkg installs?

cheers, bry
bryson_ac
Trainee
Trainee
 
Posts: 15
Joined: Thu Oct 07, 2010 8:57 am

Re: Torrentwatch(-x) anyone?

Postby dash7 » Mon Nov 08, 2010 2:36 am

no, its my first NAS so I haven't got any upgrade experience either. But I think the ipkg should be good.

(any Syno-Experts reading this thread maybe?)

I just wasn't sure about any php compatibility issues...but I just saw that torrentwatch-X 0.6.5 is final now. So I might give it a try and update both torrentwatch and the DSM.

On the other hand everything is working just fine now.
Somethings telling me to sit still - changing anything will just screw everything up :wink:
dash7
Trainee
Trainee
 
Posts: 10
Joined: Thu Oct 21, 2010 8:18 pm

Re: Torrentwatch(-x) anyone?

Postby bryson_ac » Mon Nov 08, 2010 10:52 am

yes, i'm not so sure about the dsm update either - guess i leave it as it is: especially as the system is running pretty sweet right now, and the changelog actually is not holding anything i'm particular interested in or need. so i guess i'm leaving it untouched for now. the update to tw 0.6.5 worked pretty smooth though - just saved all files holding my personal configuration (config, platform, ...) including the transmission settings file and restored those back then to the new installation.

allright, and here is my postprocessing script: unrar, remove-and-delete plus send a status mail. for sending mail you need to have "nail" installed.

Code: Select all
#! /bin/sh
cd $TR_TORRENT_DIR
if [ -d "$TR_TORRENT_NAME" ] # if exists a torrent created subfolder
  then
    if ls "$TR_TORRENT_NAME"/*/*.rar > /dev/null 2>&1 # if rar file exists in torrent created subfolder (deep)
      then
        find "$TR_TORRENT_NAME" -iname "*.rar" | while read file # find rar files and create variable
        do
          unrar e -inul "$file" /YOUR/PATH # unrar files to specific path
        done
        /usr/local/bin/transmission-remote -n transmission:root -t$TR_TORRENT_ID --remove-and-delete & # remove from torrent list delete archives
        echo "$TR_TORRENT_NAME" | /opt/bin/nail -s "A file has finished downloading." EMAIL@YOU.XX # send "finished" mail
      exit 1
    elif ls "$TR_TORRENT_NAME"/*.rar > /dev/null 2>&1 # if rar file exists in torrent created subfolder
      then
        find "$TR_TORRENT_NAME" -iname "*.rar" | while read file # find rar files and create variable
        do
          unrar e -inul "$file" /YOUR/PATH # unrar files to specific path
        done
        /usr/local/bin/transmission-remote -n transmission:root -t$TR_TORRENT_ID --remove-and-delete & # remove from torrent list delete archives   
        echo "$TR_TORRENT_NAME" | /opt/bin/nail -s "A file has finished downloading." EMAIL@YOU.XX # send "finished" mail
      exit 2   
    fi
elif (ls *.rar >/dev/null) # if rar file exists in torrent directory root
  then
    unrar e -inul "$TR_TORRENT_NAME" /YOUR/PATH # unrar files to specific path
    /usr/local/bin/transmission-remote -n transmission:root -t$TR_TORRENT_ID --remove-and-delete & # remove from torrent list delete archives
    echo "$TR_TORRENT_NAME" | /opt/bin/nail -s "A file has finished downloading." EMAIL@YOU.XX # send "finished" mail
  exit 3
fi # no rar files
/usr/local/bin/transmission-remote -n transmission:root -t$TR_TORRENT_ID --remove & # so just delete from torrent lisst
echo "$TR_TORRENT_NAME" | /opt/bin/nail -s "A file has finished downloading." EMAIL@YOU.XX # send "finished" mail


it does what it should, but i'm pretty sure there is some redundant parts in it, so anyone willing to contribute: welcome.

cheers, bry
bryson_ac
Trainee
Trainee
 
Posts: 15
Joined: Thu Oct 07, 2010 8:57 am

Previous

Return to Torrent Engines/Download Station Mods

Who is online

Users browsing this forum: No registered users and 2 guests