Using Dropbox as a Watch folder with your Rtorrent Seedbox!
Register

We are the best invite forum on the internet! Here you will find free invites, free seedboxes, free bonuses, and much more. Our members know the true meaning of sharing and have created a truly global bittorent community! Our site has the most up to date information on all private trackers and our members will guide you and introduce you to this truly secretive and enlightened club. Ready to get started? Register now!


Results 1 to 5 of 5
Like Tree7Likes
  • 6 Post By SeedStuff
  • 1 Post By Seeyabye

Thread: Using Dropbox as a Watch folder with your Rtorrent Seedbox!

  1. #1

    Join Date
    Aug 2010
    Location
    The Internetz
    Posts
    618
    Blog Entries
    2

    Default Using Dropbox as a Watch folder with your Rtorrent Seedbox!

    Hey T-I, I wrote this as a tutorial for my customers, but i thought i would share it here as well. If there are any issues let me know and i will try to correct it. It worked for me so we should be good to go!


    In order to take advantage of this, you will need to be signed up for dropbox, a free online storage service that syncs data between all your computers and mobile devices. If you do not have an account, please click here.


    This post will help you install the Linux Dropbox client on your headless Ubuntu Server and link it up to your Dropbox account. We will also show you how to setup a watch folder in your dropbox so you can easily add torrents to your seedbox from your home PC without logging in!

    Installing Dropbox

    Start by logging into your user account via SSH with putty, root is ok as well but this works alot better installed under your root account. Make sure you are in /home/username/ and start off by downloading the Linux version of Dropbox onto your server.

    Download the 32Bit Version
    Code:
    wget -O dropbox.tar.gz "http://www.dropbox.com/download/?plat=lnx.x86"
    Download the 64Bit Version
    Code:
    wget -O dropbox.tar.gz "http://www.dropbox.com/download/?plat=lnx.x86_64"
    If you unsure which version you need you can quickly check by running uname -a.
    Code:
    sudo uname -a
    If the uname output has an i686 at the end you need the 32Bit version and if it hasx86_64 you want the 64Bit version.


    When you extract the Dropbox archive it will automatically place its files in the home directory of the the user you’re logged in as under: ~/.dropbox. You can always move these files later but its something to keep in mind.

    Extract the Dropbox archive
    Code:
    tar -xzvf dropbox.tar.gz
    Linking Your Server to Your Dropbox Account

    Before you take the next step you’ll want to make sure your LANG environment variable is set to a value other than NULL.
    Check the value of your LANG environment variable

    Code:
    printenv LANG
    // outputs en_US.UTF-8 on my machine

    To connect the Dropbox client on your server to your Dropbox account you’ll need to copy the link it outputs into a browser window and then login to your Dropbox account.


    Run dropboxd on your server
    Code:
    ~/.dropbox-dist/dropboxd
    It will start outputting a link similar to this one every few seconds

    This client is not linked to any account...
    Please visit https://www.dropbox.com/cli_link?hos...b087a&cl=en_US to link this machine.

    Edit*
    It's been mentioned that the above link may not work on all machines, apparently it will spit out the link as a en_US link but you may have to change this based on your language selection such as : https://www.dropbox.com/cli_link?hos...3529f&cl=en_GB

    Note the en_GB based on alternate english settings.


    The trick to a smooth link is to make sure you leave dropboxd running while you follow the link. You don’t need to access the link from the server you’re trying to install Dropbox on. You can copy and paste that link into a browser running on a separate machine and Dropbox will authorize the client running on your server.

    Once it succeeds you’ll see the message Client successfully linked, Welcome! on your server and it will stop printing the authorization link.

    Hit ctrl c to terminate the process


    Client successfully linked, Welcome!


    Once the Dropbox client on your server is successfully linked it will automatically create a Dropbox folder under ~/Dropbox for the user you’re logged in as. All your folders will be visible under the Dropbox folder but since the Dropbox service isn’t actually running on your server yet you you won’t be able to see the files inside these folders until the client is running and has a check to synchronize.


    You can manually start the service by running

    Code:
    ~/.dropbox-dist/dropbox
    However, a better option for controlling the Dropbox client is to setup an Ubuntu service management script for it.
    Start Dropbox Automatically On Boot

    Dropbox provides a handy little service management script that makes it easy to start, stop and check the status of the Dropbox client.
    Create a new file for the service management script
    Code:
    sudo nano /etc/init.d/dropbox
    Paste the following script into the new file

    Code:
    #!/bin/sh
    # dropbox service
    # Replace with linux users you want to run Dropbox clients for
    DROPBOX_USERS="user1"
    DAEMON=.dropbox-dist/dropbox
    start() {
    echo "Starting dropbox..."
    for dbuser in $DROPBOX_USERS; do
    HOMEDIR=`getent passwd $dbuser | cut -d: -f6`
    if [ -x $HOMEDIR/$DAEMON ]; then
    HOME="$HOMEDIR" start-stop-daemon -b -o -c $dbuser -S -u $dbuser -x $HOMEDIR/$DAEMON
    fi
    done
    }
    stop() {
    echo "Stopping dropbox..."
    for dbuser in $DROPBOX_USERS; do
    HOMEDIR=`getent passwd $dbuser | cut -d: -f6`
    if [ -x $HOMEDIR/$DAEMON ]; then
    start-stop-daemon -o -c $dbuser -K -u $dbuser -x $HOMEDIR/$DAEMON
    fi
    done
    }
    status() {
    for dbuser in $DROPBOX_USERS; do
    dbpid=`pgrep -u $dbuser dropbox`
    if [ -z $dbpid ] ; then
    echo "dropboxd for USER $dbuser: not running."
    else
    echo "dropboxd for USER $dbuser: running (pid $dbpid)"
    fi
    done
    }
    case "$1" in
    start)
    start
    ;;
    stop)
    stop
    ;;
    restart|reload|force-reload)
    stop
    start
    ;;
    status)
    status
    ;;
    *)
    echo "Usage: /etc/init.d/dropbox {start|stop|reload|force-reload|restart|status}"
    exit 1
    esac
    exit 0
    Make sure you replace the value of DROPBOX_USERS with your username on your machine you want to run the Dropbox client to run for.

    Make sure the script is executable and add it to default system startup run levels

    Code:
    sudo chmod +x /etc/init.d/dropbox
    sudo update-rc.d dropbox defaults

    Control the Dropbox client like any other Ubuntu service

    Code:
    sudo service dropbox start|stop|reload|force-reload|restart|status
    Creating a "watch" folder to dump .torrent files into

    In order to create a watch folder, access your dropbox in whatever means you usually do and create a folder called "watch". In reality you can name this anything you want, just remember for later what you have chosen.


    In your ssh screen, change into your user directory where your rtorrent installation is.



    Code:
    cd /home/username
    Once you are in the right directory, open your .rtorrent.rc config file.
    Code:
    nano .rtorrent.rc
    Find the line that contains the "schedule =" and replace it to be consistant with the following:
    Code:
    schedule = watch_directory,5,5,load_start=~/Dropbox/watch/*.torrent

    Edit* You can also add a second line this file and have two watch difectories:

    Code:
    schedule = watch_directory,5,5,load_start=~/Dropbox/watch/*.torrent
    schedule = watch_directory_1,5,5,load_start=~/rtorrent_watch/*.torrent
    You should now be able to drop files into your watch folder and enjoy easy torrent adding. Please note, all files in your current watch directory will need to be moved in order to show up. Also, upon initial setup, your seedbox will need to sync to your dropbox account. This may take some time depending on the size of your dropbox.
    Last edited by SeedStuff; March 12th, 2012 at 12:09 PM.


  2. To remove ads become VIP. Inquire about advertising here.
  3. #2

    Join Date
    Mar 2011
    Location
    Sheffield, England
    Posts
    583

    Default

    So if I only use Safari for my torrent sites (which I do) then the most useful thing I can do with this tutorial is set the options in Safari to download files without prompting to my dropbox/watch folder?

    Thats great! ..So in that case I finally know a way to auto-add .torrents with one click!

    Just one thing, I already have a watch folder for rtorrent. Is it possible to have a second watch folder by having the line in the config file you quoted a second time?

    Eg.
    Code:
    schedule = watch_directory,5,5,load_start=~/Dropbox/watch/*.torrent
    schedule = watch_directory,5,5,load_start=~/rtorrent_watch/*.torrent
    Last edited by Kitkatra; February 17th, 2012 at 01:09 PM.

  4. #3

    Join Date
    Feb 2010
    Posts
    448

    Default

    Quote Originally Posted by Kitkatra View Post
    So if I only use Safari for my torrent sites (which I do) then the most useful thing I can do with this tutorial is set the options in Safari to download files without prompting to my dropbox/watch folder?

    Thats great! ..So in that case I finally know a way to auto-add .torrents with one click!

    Just one thing, I already have a watch folder for rtorrent. Is it possible to have a second watch folder by having the line in the config file you quoted a second time?

    Eg.
    Code:
    schedule = watch_directory,5,5,load_start=~/Dropbox/watch/*.torrent
    schedule = watch_directory,5,5,load_start=~/rtorrent_watch/*.torrent
    You can have multiple watch folders. The 2nd line should have a different name though.

    Code:
    schedule = watch_directory,5,5,load_start=~/Dropbox/watch/*.torrent
    schedule = watch_directory_1,5,5,load_start=~/rtorrent_watch/*.torrent
    Kitkatra likes this.

  5. #4

    Join Date
    Apr 2012
    Posts
    9

    Default

    Thanks for share! I thinked that imporsible. :D

  6. #5
    aspects is offline aspects's Avatar
    PotUK Recruiter

    Join Date
    Mar 2012
    Location
    Malvern, UK
    Posts
    72

    Default

    I've used dropbox on linux servers many times, it helps me at work too linking files between various boxes. I'm gonna give this a go too now :D

    Nice tutorial :)

Similar Threads

  1. Do you have a monthly bandwidth limit with your ISP?
    By DrunkenBum in forum General Discussion
    Replies: 305
    Last Post: March 26th, 2010, 06:21 AM
  2. Type with your elbow.
    By Elonoir in forum General Discussion
    Replies: 197
    Last Post: September 14th, 2009, 08:15 PM
  3. Hit your keyboard with your forehead
    By zuja in forum General Discussion
    Replies: 249
    Last Post: August 23rd, 2009, 02:50 PM
  4. Type with your feet
    By xandyaxis in forum General Discussion
    Replies: 2
    Last Post: March 1st, 2009, 11:51 PM
  5. Best way to watch .mkv? with PS3?!
    By coolkensington in forum General Discussion
    Replies: 8
    Last Post: February 27th, 2009, 12:41 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •