Dato che c'erano poche pagine su questo wiki, ho pensato di farne una nuova!
Come configurare la fonera 2 per scaricare torrent su hard disk esterno
- Formattare l'hard disk (FAT ahimè è il più compatibile)
- Installare i moduli per leggere il fs (debuggare eventuali problemi con l'aiuto di dmsg)
opkg install kmod-fs-vfat kmod-usb-storage opkg install kmod-scsi-core kmod-scsi-generic opkg install kmod-usb-ohci kmod-usb-uhci kmod-usb2 libusb-1.0 libusb kmod-nls-cp437 kmod-nls-iso8859-1
- A questo punto Installare transmission
opkg install transmission-daemon transmission-web
- Ora dobbiamo configurare transmission. Creare un file .json tipo questo dentro una directory dell'hard disk esterno (nella stessa directory transmission salverà anche i file .torrent, non possiamo lasciarli nella fonera senno' si intoppa). Per avere il file da modificare basta lanciare transmission e cercare in /root/.config/
{
"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": "\/mnt\/usbdrive\/download",
"encryption": 1,
"incomplete-dir": "\/mnt\/usbdrive\/fonera_torrent\/\/Incomplete",
"incomplete-dir-enabled": false,
"lazy-bitfield-enabled": true,
"message-level": 2,
"open-file-limit": 32,
"peer-limit-global": 240,
"peer-limit-per-torrent": 60,
"peer-port": 51413,
"peer-port-random-high": 65535,
"peer-port-random-low": 49152,
"peer-port-random-on-start": false,
"peer-socket-tos": 0,
"pex-enabled": true,
"port-forwarding-enabled": true,
"preallocation": 1,
"proxy": "",
"proxy-auth-enabled": false,
"proxy-auth-password": "",
"proxy-auth-username": "",
"proxy-enabled": false,
"proxy-port": 80,
"proxy-type": 0,
"ratio-limit": 214748.3647,
"ratio-limit-enabled": false,
"rename-partial-files": true,
"rpc-authentication-required": true,
"rpc-bind-address": "0.0.0.0",
"rpc-enabled": true,
"rpc-password": "{dndsjkandsjkand\/A",
"rpc-port": 9091,
"rpc-username": "myusername",
"rpc-whitelist": "127.0.0.1",
"rpc-whitelist-enabled": false,
"speed-limit-down": 50,
"speed-limit-down-enabled": true,
"speed-limit-up": 30,
"speed-limit-up-enabled": true,
"umask": 18,
"upload-slots-per-torrent": 14
}- ora ci serve uno script in init.d che ci monti l'hard disk esterno e faccia partire transission impostando correttamente la directory di configurazione
START=80
STOP=40
start()
{
echo -n "Mounting USB drive: "
mount -t vfat /dev/sda1 /mnt/hd
echo "Done."
echo -n "Starting Transmission: "
/usr/bin/transmission-daemon -f -g /mnt/hd/fonera_torrent_config/
echo "Done."
}
stop()
{
echo -n "Umounting USB drive: "
sync
sync
umount /dev/sda1
echo "Done."
echo -n "Stopping transmission..."
killall transmission-daemon
echo -n "Done."
}
restart()
{
stop
start
}