[Ubuntu-BR] Vídeo do Mark Shuttleworth

Jansen Carlo Sena jansen em comunidadesol.org
Sábado Dezembro 3 11:33:51 UTC 2005


Pessoal,

acho que a idéia do torrent é legal. Entretanto, pensei que pudéssemos 
centralizar esse vídeo ou o próprio arquivo .torrent na própria página 
do Ubuntu-BR. Presumo que essa seria uma opção mais apropriada.

O que vocês acham?

Abraço,

Jansen

Ian wrote:
> Fala Jansen,
> sera legal um .torrent eu acho :
> 
> # apt-get install bittorrent bittorrent-gui
> # mkdir /var/uploadfiles/
> # mkdir /var/uploadfiles/share
> # mkdir /var/uploadfiles/incoming
> # mkdir /var/www/files/torrent/
> 
> em  /usr/bin criar o  arquivo chamado bittorrent.sh com ->
> 
> --------
> #! /bin/sh
> #
> # ----------------------------------------------------------------------- # |  B I T T O R R E N T
>    M A N A G E M E N T
> # |
> # | PURPOSE:    Control panel for the management of BitTorrent
> # |        functions located on an Ubuntu system.
> # |
> # |
> # |
> # | USAGE:    bittorrent.sh {start|stop|restart|make-all|make-single [filename]} # |
> # |
> # |
> # | NOTES:
> # |     Be sure to put your IP address in below.
> # |
> # |        Make-all creates torrents for all files in FILESINCOMING and places # |        them
> into FILESDIR
> # |
> # |        Make-single [filename] does this for a single file
> # |
> # -----------------------------------------------------------------------
> 
> #BEGIN USER MODIFIABLE VARIABLES
>     PATH=/sbin:/bin:/usr/sbin:/usr/bin
>     DAEMON=/usr/bin/bttrack.py
>     LAUNCH=/usr/bin/btlaunchmany.py
>     #MAKEMETA switches from btmakemetainfo to btmaketorrent with 4.0
> MAKEMETA=/usr/bin/btmaketorrent.py
>     DFILE=/var/uploadfiles/dstate
>     PORT=6969
>     LOGFILE=/var/log/tracker.log
>     NAME="bttrack.py"
>     DESC="bittorrent tracker"
>     # the directory where BitTorrent distributes files from
>     FILESDIR=/var/uploadfiles/share
>     # the directory where incoming files are made into torrents, then moved to the share directory
> above
>     FILESINCOMING=/var/uploadfiles/incoming
>     # the directory where users can get the torrents via http from their browser
> TORRENTSDIR=/var/www/files/torrent
>     SERVER=http://www.yourserver.org:6969
> #END USER MODIFIABLE VARIABLES
> 
> #Tracker configuration options.
> OPTIONS="--dfile $DFILE --port $PORT --logfile $LOGFILE"
> test -f $DAEMON || exit 0
> cd $FILESDIR
> set -e
> 
> case "$1" in
> make-all)
>     #Move each file from FILESINCOMING to FILESDIR. Create torrent.  Copy torrent to TORRENTSDIR.
> echo "Making torrents: "
>     for file in $FILESINCOMING/*
>     do
>         if [ `basename $file` = "." ]; then
>             continue;
>         fi
>         echo $file
>         mv $file $FILESDIR
>         # These arguments changed order with the move to btmaketorrent.py $MAKEMETA
> $SERVER/announce $FILESDIR/$(basename $file)
>         cp $FILESDIR/$(basename $file).torrent $TORRENTSDIR/$(basename $file).torrent
>     done
>     echo "."
> ;;
> 
> make-single)
>     #Move specified file from FILESINCOMING to FILESDIR.  Create torrent.  Copy torrent to
> TORRENTSDIR.
>     echo "Making torrents for $2: "
>         echo $2
>         mv $FILESINCOMING/$2 $FILESDIR
>         # These arguments changed order with the move to btmaketorrent.py $MAKEMETA
> $SERVER/announce $FILESDIR/$2
>         cp $FILESDIR/$2.torrent $TORRENTSDIR/$2.torrent
>     echo "."
> ;;
> 
> start)
>     #Start the Tracker as well as a Downloader for each .torrent
>     echo -n "Starting $DESC: $NAME"
>     start-stop-daemon --oknodo -S -b -x $DAEMON -- $OPTIONS
>     # Insert your ip address below
>     start-stop-daemon --oknodo -S -b -x $LAUNCH -- --ip xx.xx.xx.xx $FILESDIR echo "."
> ;;
> 
> stop)
>     #Stop the Tracker as well as the Downloaders
>     echo -n "Stopping $DESC: $NAME"
>     start-stop-daemon --oknodo -K -q -R 30 -n $NAME
>     start-stop-daemon --oknodo -K -q -R 30 -n $(basename $LAUNCH)
>     echo "."
> ;;
> 
> restart)
>     #Stop and then start the Tracker as well as the Downloaders
>     echo "Restarting $DESC: $NAME"
>     start-stop-daemon --oknodo -K -q -R 30 -n $NAME
>     start-stop-daemon --oknodo -K -q -R 30 -n $(basename $LAUNCH)
>     start-stop-daemon --oknodo -S -b -x $DAEMON -- $OPTIONS
>     # Insert your ip address below
>     start-stop-daemon --oknodo -S -b -x $LAUNCH -- --ip xx.xx.xx.xx $FILESDIR echo "."
> ;;
> *)
>     #Echo usage information
>     echo "Usage: $0 {start|stop|restart|make-all|make-single [filename]}" >&2 exit 1
> ;;
> 
> #All is good with the world.  Exit kindly.
> esac
> 
> exit 0
> 
> 
> --------
> 
> iniciar assim ->
> 
> # /usr/bin/bittorrent.sh start
> 
> colocar o videozinho em  /var/uploadfiles/incoming
> 
> /usr/bin/bittorrent.sh make-all
> 
> esse vai criar o arquivo torrent e mv o videozinho e o arquivo .torrent para /var/uploadfiles/share.
> 
> assim a galera pode browse para:
> http://www.yourserver.org/files/torrent/videozinho.torrent
> 
> e o torrent vai iniciar automaticamente quando clickear usando gnome-btdownload que esta parte do
> sistema ubuntu
> []'s
> Ian




More information about the ubuntu-br mailing list