Category:BitTorrent / MLDonkey
Transmission on TS-201
In order to get Transmission running on a TS-201 you need to do the following:
Firstly make sure you have QPKG installed to your box, then use this to install Optware IPKG. Now you need to Telnet/SSH to your QNAP and login as administrator.
Now we can issue the ipkg update command to get the latest updates:
Then we can Install "nano" from ipkg to help with file editing:
ipkg install nano
And of course we also need to install the transmission daemon:
ipkg install transmission
Using Nano we can now edit the autorun.sh using:
mount -t ext2 /dev/mtdblock4 /tmp/config nano /tmp/config/autorun.sh
You can edit this file how you want, this is some basic code for the autorun of Transmission:
#TRANSMISSION AUTORUN /bin/echo "/share/MD0_DATA/.qpkg/Optware/lib" >> /etc/ld.so.conf /sbin/ldconfig export EVENT_NOEPOLL=0 export TRANSMISSION_WEB_HOME=/share/MD0_DATA/.qpkg/Optware/share/transmission/web /share/MD0_DATA/.qpkg/Optware/bin/transmission-daemon -g /share/Qdownload/.config/ -w /share/Qdownload/ -c /share/Qdownload/Watch_Folder/ #END
You need to specify the config location using -g somewhere where it wont get deleted on restart, -w is the working folder and finally -c is a watch folder (if you need to use this)
Once your autorun script is done you need to make it executable and then unmount the path:
chmod +x /tmp/config/autorun.sh umount /tmp/config
Hope that helps someone out there :) A detailed discussion of this script and others can be found in the QNAP forums: http://forum.qnap.com/viewtopic.php?f=87&t=12122
Transmission on other QNAP models
The above script should work on other QNAP models such as TS-101, TS-239 etc. The main differences are the location of the autorun.sh file and the type of disk array.
- For 2+ hard drive models the script should use MD0_DATA when defining file paths.
- For models with only 1 single hard drive HDA_DATA should be used in place of the above.
To know which mtdblock to mount for autorun.sh editing please refer to this wiki page: http://wiki.qnap.com/wiki/Running_Your_Own_Application_at_Startup
Running Transmission as another user
As it is not a good idea to run transmission as "admin" (or other account with root access) you should create another user to run under. This can be done via the QNAP user management page, for this example we will run transmission using the user "transmission". Once you have created the user in the QNAP admin pages we will need to install the "su" command package via "coreutils", open a telnet session:
ipkg update ipkg install coreutils
After the package is installed we need to modify the autorun.sh script. Follow the instructions above to mount the required mtdblock and change the line that calls the transmission-daemon (replace "transmission" with the username you have created):
/share/MD0_DATA/.qpkg/Optware/bin/coreutils-su -c "/share/MD0_DATA/.qpkg/Optware/bin/transmission-daemon -g /share/Qdownload/.config/ -w /share/Qdownload/ -c /share/Qdownload/Watch_Folder/" - transmission
Now save the autorun.sh file and make it executable (as in the instructions above) and finally unmount the mtdblock. Perform a restart.
Once restarted we can check that transmission is running under the new username by typing the following within Telnet:
ps -gf | grep transmission
You should see the process in the list with your allocated username next to it.