Samstag, 30. Januar 2010

torrent client, the 2010 edition

Forget rtorrent, newest releases often report "bencoded" error, therefore swicth to

tranmission

sudo apt-get install transmission transmission-deamon

then edit the /etc/transmission-daemon/settings.json to be compliant with tor privoxy, local port settings, watch dir. Bes sure to sto the deamon before editing the file


{
"alt-speed-down": 50,
"alt-speed-enabled": false,
"alt-speed-time-begin": 540,
"alt-speed-time-day": 127,
"alt-speed-time-enabled": false,
"alt-speed-time-end": 1020,
"alt-speed-up": 50,
"bind-address-ipv4": "0.0.0.0",
"bind-address-ipv6": "::",
"blocklist-enabled": false,
"dht-enabled": true,
"download-dir": "\/home\/daevu\/finished",
"encryption": 1,
"lazy-bitfield-enabled": true,
"message-level": 2,
"open-file-limit": 32,
"peer-limit-global": 240,
"peer-limit-per-torrent": 60,
"peer-port": 62078,
"peer-port-random-high": 64000,
"peer-port-random-low": 62000,
"peer-port-random-on-start": true,
"peer-socket-tos": 0,
"pex-enabled": true,
"port-forwarding-enabled": true,
"preallocation": 1,
"proxy": "127.0.0.1",
"proxy-auth-enabled": false,
"proxy-auth-password": "",
"proxy-auth-username": "",
"proxy-enabled": true,
"proxy-port": 8118,
"proxy-type": 2,
"ratio-limit": 2.0000,
"ratio-limit-enabled": false,
"rpc-authentication-required": false,
"rpc-bind-address": "0.0.0.0",
"rpc-enabled": true,
"rpc-password": "{9da631e4ce6a9d2e6408c781a2c18c41e5f03250qeZzHteA",
"rpc-port": 9091,
"rpc-username": "",
"rpc-whitelist": "192.168.*.*",
"rpc-whitelist-enabled": true,
"speed-limit-down": 100,
"speed-limit-down-enabled": false,
"speed-limit-up": 5,
"speed-limit-up-enabled": true,
"umask": 18,
"upload-slots-per-torrent": 14,
"watch-dir": "\/home\/daevu\/torrents\/",
"watch-dir-enabled": true
}



check on client:
install daemon
add torrent
$ transmission-remote -a one.torrent two.torrent
transmission-remote -tall --start


To move finished torretns to a predefined directory

- sudo apt-get install php5-cli
- add stop-and-move-finished.php script, modify it to your needs and
- make a cronjob
0,10,20,30,40,50 * * * * /usr/bin/php /home/daevu/top-and-move-finished.php >/dev/null 2>&1

Dienstag, 22. Dezember 2009

rtorrent in ubuntu karmic

jus make a script out of:
http://libtorrent.rakshasa.no/wiki/Install

Samstag, 12. Dezember 2009

timelapse movie

-Install motion
http://www.lavrsen.dk/foswiki/bin/view/Motion/WebHome
edit motion.conf

# Image width (pixels). Valid range: Camera dependent, default: 352
width 640

# Image height (pixels). Valid range: Camera dependent, default: 288
height 480

output_normal off




- set timelapse var (use 10min) get an idea aoubit settings from http://en.wikipedia.org/wiki/Time-lapse

# Use ffmpeg to encode a timelapse movie
# Default value 0 = off - else save frame every Nth second
ffmpeg_timelapse 600

# The file rollover mode of the timelapse video
# Valid values: hourly, daily (default), weekly-sunday, weekly-monday, monthly, manual
ffmpeg_timelapse_mode manual


- dowload sunwait http://ppa.launchpad.net/mdeslaur/ubuntu/pool/main/s/sunwait/

Dienstag, 9. Juni 2009

Save torrenting moblock peerguardian

just to be on the save side of life while torrenting
Using moblock according to
http://moblock-deb.sourceforge.net/
additional how to under: https://help.ubuntu.com/community/MoBlock

Very important: make sure you can still talk to your headless machine!! add doing

sudo nano /etc/blockcontrol/blockcontrol.conf

ssh allow all incoming traffic on port 22

WHITE_TCP_IN="22"

otherwise you will be blocked out!

Mittwoch, 4. Februar 2009

Check network connection

- create a file check_network.sh

#!/bin/bash
x=`ping -c1 google.com 2>&1 | grep unknown`
if [ ! "$x" = "" ]; then
echo "It's down!! Attempting to restart."
/etc/init.d/networking restart
echo "restarted gurke" | mail -s gurke_restart test@hotmail.com
fi



- chmod 777 check_network.sh
- add it to crontab so it checks it for every hour or so..

Mittwoch, 2. Juli 2008

webgui status rtorrent over cgi

Follow this instructions

http://www.g-loaded.eu/2007/06/23/rtorstat-a-simple-rtorrent-status-web-page-generator/

1) to get it run
edit rtorstat.py and get rid of this:

Requirement
try:
from bencode import bdecode
except ImportError:
try:
from BitTorrent.bencode import bdecode
except ImportError:
sys.stderr.write("%s: ERROR: Missing dependency\nbencode.py was not found in current directory or in local BitTorrent Client (Mainline) installation.\n" % sys.argv[0])
sys.stderr.flush()
sys.exit(1)

download somewhere from the web "bencode.py" file and JUST paste it where the previouys lines above were....

2) access over the your installation
place 3 files in your cgi-bin (/usr/lib/cgi-bin/) : rtorstat.py, rtorstat.cgi and bencode.py.

Now, you can visit the web page http://yourdomain.example.org/cgi-bin/rtorstat.cgi

Samstag, 26. Januar 2008

External Hard Drive

get more gigs

you can not life these days with only 20 gig, so: configuring the External Hard Drive, as recommended in here

a)add in /etc/fstab

/dev/sdb1 pladde/ ntfs-3g defaults,force 0 0

b) After the installation is done, you can optionally add an external hard drive to make it easier to move your data. We'll be using a service called "autofs" to automatically detect your hard drive and make it ready to share on the network each time you plug it in. To install autofs, use this command:

sudo apt-get install autofs

Once that finishes, you'll want to connect your external hard drive and find out what device Ubuntu assigns it. After plugging in the hard drive wait a few seconds and then enter this command:

dmesg | tail

You should see something very similar to this:


[47820.164000] sdb: Write Protect is off
[47820.164000] sdb: Mode Sense: 03 00 00 00
[47820.164000] sdb: assuming drive cache: write through
[47820.164000] SCSI device sdb: 398297088 512-byte hdwr sectors (203928 MB)
[47820.168000] sdb: Write Protect is off
[47820.168000] sdb: Mode Sense: 03 00 00 00
[47820.168000] sdb: assuming drive cache: write through
[47820.168000] sdb: sdb1
[47820.184000] sd 4:0:0:0: Attached scsi disk sdb
[47820.184000] sd 4:0:0:0: Attached scsi generic sg2 type 0

The line "[47820.168000] sdb: sdb1" is what you'll want to pay attention to. This tells us that Ubuntu is assigning the device to "sdb", and it's partition is labeled as "sdb1". "1" being the first and only partition on the disk. Next, we'll what to find out what kind of partition is on the disk. Enter this into the console:

sudo fdisk -l /dev/sdb

The "System" column will display what kind of partition it is. Take note on what type of partition it is for the following instructions. If it's "HPFS/NTFS", you'll want to use the "ntfs-3g" driver. If it contains "FAT", you'll use the "vfat" driver. Finally, if it's "Linux", you can just use the "auto" driver. Note, if it is a NTFS partition, you will have to manually install the new NTFS read/write drivers by using:

sudo apt-get install ntfs-3g

Next, we'll want to add this information to the autofs service. Use to following command to edit to autofs master configuration file:

sudo nano /etc/auto.master

Note: You can replace "nano" with your preferred text editor. To save a file in nano, use the keyboard shortcut Ctrl+O. To exit, press Ctrl+X.

Now, find the line containing:

#/misc /etc/auto.misc

Change it to:

/misc /etc/auto.misc --timeout=60

Save it and edit the autofs "miscellaneous" configuration file next by entering this command:

sudo nano /etc/auto.misc

Add this to the bottom of the file:

external -fstype=ntfs-3g :/dev/sdb1

Remember to replace "ntfs-3g" with the type of driver you found earlier in this section. Note, if you are using "ntfs-3g", you might want to append ",force" , making it "-fstype=ntfs-3g,force". This makes it easier to use uncleanly unmounted drives. This maybe a little risky, but it makes it so much easier to troubleshoot.

Finally, restart the autofs service:

sudo /etc/init.d/autofs restart

Now, every time anything tries to find files in the "/misc/external" directory, Ubuntu will attempt to automatically mount that drive to be used.