DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2007-02-09 22:36:54

jerrison
Member
Registered: 2007-02-04
Posts: 13

simple solution for torrent folder monitoring

Hi there...
thanks to the guys who showed how to set up a debian system, i was able to get a basic torrent-autoloader working.
i use ctorrent and a shell script (i found somewhere and changed a little bit) which goes like this:

Code:

#!/bin/sh
DL_DIR=/mnt/HD_a2/Files/torrents/Download;

if [ "$(ps | grep -i "ctorrent" | grep -v grep)" ]
then
    echo "['date'] tqueue: ctorrent already running" >> $DL_DIR/.log ;
    break ;
else
    cd $DL_DIR/queue ;

    for NAME in $(/usr/bin/find -name "*.torrent") ;
    do
        echo "['date'] tqueue: new torrent found, downloading $NAME" >> $DL_DIR/.log ;

      mv $NAME $DL_DIR/active ;
      cd $DL_DIR/active ;
        /bin/ctorrent -e 1 -U 30 -p 6882 $NAME ;

       mv * $DL_DIR/ready ;
    chmod -R 777 $DL_DIR/ready/*

        exit ;
    done
    
    echo "['date'] tqueue: no new torrent found" >> $DL_DIR/.log ;
fi

change the Download directory "DL_DIR" to your needs, add an entry to etc/crontab like:

Code:

*/1     * * * * root    /script-path/script

import the crontab for the root user (crontab -u root /etc/crontab)
and ctorrent will download the files one at a time without the need to start a download session manually (so you can actually turn off any computers and let the DNS-323 do the downloading stuff).
it works for me so far but iīm sure there are tons of better ways to get this thing working smile.

Last edited by jerrison (2007-02-09 22:37:43)

Offline

 

#2 2007-02-10 01:15:16

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 731
Website

Re: simple solution for torrent folder monitoring

Nice one, I haven't tested it but it looks good. Maybe we can expand this script to run multiple torrents at once.


• DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
• NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

#3 2007-02-10 12:00:02

Apskaft
Member
From: Karlskrona, Sweden
Registered: 2007-01-09
Posts: 165

Re: simple solution for torrent folder monitoring

Also, take alook at these scripts. Multiple trasnfers and WEB GUI, ctorrent as torrent-engine.

http://www.openmss.org/HowTo/TorrentDownloader


edit: Added ctorrent which runs as standalone - no need for debian sarge using this. Just put in lnx_bin. Requires modificaton to script above.
/Apan

Last edited by Apskaft (2007-02-10 13:48:22)

Offline

 

#4 2007-02-10 16:14:48

jerrison
Member
Registered: 2007-02-04
Posts: 13

Re: simple solution for torrent folder monitoring

i read that article before but didnīt want to go through the hussle of running a php-webserver on arm and all the other stuff. as far as i know there is no crond comiled for the dns-323 or is there? i wish we could drop the chroot enviromnent, too smile. did anyone ever try to use openslug on the dns-323? they say it should be compatible with arm processors and their package system works like charm.

Offline

 

#5 2007-02-10 16:16:13

jerrison
Member
Registered: 2007-02-04
Posts: 13

Re: simple solution for torrent folder monitoring

sala wrote:

Nice one, I haven't tested it but it looks good. Maybe we can expand this script to run multiple torrents at once.

yeah, i wish we could do that...but i have no idea about memory limitations and how much connections the dns-323 can handle...web interface would be awesome as well...right now i can only see that ctorrent is running, nothing more.

Offline

 

#6 2007-02-10 17:51:02

Apskaft
Member
From: Karlskrona, Sweden
Registered: 2007-01-09
Posts: 165

Re: simple solution for torrent folder monitoring

jerrison wrote:

i read that article before but didnīt want to go through the hussle of running a php-webserver on arm and all the other stuff. as far as i know there is no crond comiled for the dns-323 or is there? i wish we could drop the chroot enviromnent, too smile. did anyone ever try to use openslug on the dns-323? they say it should be compatible with arm processors and their package system works like charm.

cron is already running on the unit....


# # ps | grep cron

1024 root        328 S   crond
26176 root        244 S   grep cron


/Apan

Offline

 

#7 2007-02-11 01:41:42

jerrison
Member
Registered: 2007-02-04
Posts: 13

Re: simple solution for torrent folder monitoring

Apskaft wrote:

jerrison wrote:

i read that article before but didnīt want to go through the hussle of running a php-webserver on arm and all the other stuff. as far as i know there is no crond comiled for the dns-323 or is there? i wish we could drop the chroot enviromnent, too smile. did anyone ever try to use openslug on the dns-323? they say it should be compatible with arm processors and their package system works like charm.

cron is already running on the unit....


# # ps | grep cron

1024 root        328 S   crond
26176 root        244 S   grep cron


/Apan

youīre right...havenīt really checked. well, so we can skip chrooting but i still donīt know about downloading multiple torrents at once. i downloaded my first gigabyte torrent today and it worked hassle-free smile.

Offline

 

#8 2007-04-13 02:09:00

Raven
Member
Registered: 2007-04-06
Posts: 25

Re: simple solution for torrent folder monitoring

Hi there,

after several difficulties I managed to run the OpenMSS Q3 WebGui for CTorrent and I must say: THIS ROCKS!
My unit now has a Debian Etch, lighttpd and php4 installed, running swiftly and without any problems.

If there is interest, I would contact the author of the Q3 and ask for permission to upload the modified package and write a little HowTo...

Greetings

Offline

 

#9 2007-04-13 11:58:41

votum
Member
From: Stockholm, Sweden
Registered: 2007-02-28
Posts: 27

Re: simple solution for torrent folder monitoring

Raven.

Please contact the author - I want this to work on my DNS-323, but as the total newbie I am, I'm totally lost without a HowTo-guide. My computer is running with UTorrent 24-7 at home which isn't that good. This solution would rock my world for sure!

Offline

 

#10 2007-04-13 16:15:44

czeslaw
New member
Registered: 2007-04-13
Posts: 3

Re: simple solution for torrent folder monitoring

Hi Raven,

I am also interested. It would be fantastic if you could upload the package.

It was really nice work of you to get it to work.

Offline

 

#11 2007-04-14 18:02:29

Raven
Member
Registered: 2007-04-06
Posts: 25

Re: simple solution for torrent folder monitoring

Hi there,

contacted the author, no reply, hope he will react soon... next week university starts again, hope I find enough time for the HowTo...

Greetings

Offline

 

#12 2007-05-07 21:32:11

coalfield
Member
Registered: 2007-05-07
Posts: 20

Re: simple solution for torrent folder monitoring

This how to would be great!  Just the thing I am looking for!  Keep trying!

Offline

 

#13 2007-05-07 21:33:42

Raven
Member
Registered: 2007-04-06
Posts: 25

Re: simple solution for torrent folder monitoring

Problem with the HowTo:
I had to modify some little things (easy but had to be done) and without the permission of the owner of the code, I cant publish anything (but help via PM wink )

Offline

 

#14 2011-03-01 01:56:38

eilz
New member
Registered: 2011-03-01
Posts: 4

Re: simple solution for torrent folder monitoring

I know its an old thread, but does anyone (hopefully Raven) still have a copy of the Original OpenMSS Q3 scripts from http://www.openmss.org/HowTo/TorrentDownloader

Link broken.., I have an old Maxtor with OpenMSS and want to setup CTorrent with web gui

Thanks in advance.. I'd really appreciate it any help..

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB