Transmission Download Dir

Post Reply
Skyquest
Posts: 12
Joined: Wed Dec 07, 2011 2:03 pm

Transmission Download Dir

Post by Skyquest » Thu Dec 22, 2011 9:48 pm

Hi all,

I've got a question:
I've managed to get the transmission web interface working using the great script for creating a custom capsule.
Now i want the system to download my files directly to the USB disk that's connected to the external port of the 2big.
the downloads i've started from the dashboard have the download dir: /​media/​internal_​1/​shares/​3/​Download

What download dir should i use in the preferences setting 'default download dir' in the transmission web interface to reach my external USB disk.

thanks in advance.

andreus
Posts: 134
Joined: Wed Dec 16, 2009 9:57 pm

Re: Transmission Download Dir

Post by andreus » Wed Jan 04, 2012 8:50 pm

that download dir '/​media/​internal_​1/​shares/​3/​Download' or /shares/YOUR.SHARE.NAME'

be advised that when you restart the NAS the download dir setting will be the default again

To make it permanent, you should replace the '/etc/initng/transmission.i' file code by this one and restart your lacie

Code: Select all

#!/sbin/itype
# This is a i file, used by initng parsed by install_service

daemon transmission {
	need = virtual/net transmission/blacklist;
	also_stop = transmission/blacklist;
	pid_file = /var/run/transmission.pid;
	script daemon = {
		if [ ! -e /lacie/torrent_dir/transmission/settings.json.backup ]; then
			cp -dp /lacie/torrent_dir/transmission/settings.json /lacie/torrent_dir/transmission/settings.json.backup
			cp -dp /usr/lib/python2.6/site-packages/unicorn/download/torrent.py /usr/lib/python2.6/site-packages/unicorn/download/torrent.py.backup
		fi
		share_name="YOUR.SHARE.NAME"

		replace_from="\"rpc-whitelist-enabled\": true,"
		replace_to="\"rpc-whitelist-enabled\": false,"
		sed -i s/"${replace_from}"/"${replace_to}"/g /lacie/torrent_dir/transmission/settings.json

		replace_from="\"download-dir\": \"\/home\","
		replace_to="\"download-dir\": \"\/shares\/${share_name}\/Download\","
		sed -i s/"${replace_from}"/"${replace_to}"/g /lacie/torrent_dir/transmission/settings.json

		replace_from="\"incomplete-dir\": \"\/root\/Downloads\","
		replace_to="\"incomplete-dir\": \"\/shares\/${share_name}\/Download\/incomplete\","
		sed -i s/"${replace_from}"/"${replace_to}"/g /lacie/torrent_dir/transmission/settings.json

		replace_from="'rpc_whitelist_enabled', True"
		replace_to="'rpc_whitelist_enabled', False"
		sed -i s/"${replace_from}"/"${replace_to}"/g /usr/lib/python2.6/site-packages/unicorn/download/torrent.py

		replace_from="'download_dir', u'\/home"
		replace_to="'download_dir', u'\/shares\/${share_name}\/Download"
		sed -i s/"${replace_from}"/"${replace_to}"/g /usr/lib/python2.6/site-packages/unicorn/download/torrent.py

		replace_from="'incomplete-dir', u'\/root\/Downloads"
		replace_to="'incomplete-dir', u'\/shares\/${share_name}\/Download\/incomplete"
		sed -i s/"${replace_from}"/"${replace_to}"/g /usr/lib/python2.6/site-packages/unicorn/download/torrent.py

		/usr/bin/transmission-daemon -f \
		--config-dir /lacie/torrent_dir/transmission \
		--pid-file /var/run/transmission.pid;
		}
	stdall = /var/log/transmission.log;
	respawn;
}

service transmission/blacklist {
	exec start = /usr/sbin/blacklist install;
	exec stop = /usr/sbin/blacklist remove;
}
just replace YOUR.SHARE.NAME by your share name in the code

Post Reply