Just imagine: you'll drop *.torrent-files to Dropbox folder and router download it and report you when finished with a text file placed back to Dropbox folder.
This solution uses Dropbox-Uploader which is already in Entware repo.
1. Prerequisites
asuswrt-merlin firmware on board and a USB drive with Entware installation.
2. Installation
Install necessary packages and fix root account for the cron service:
Place this content to /opt/etc/cron.5mins/torrent-watch.sh
and make it executable:
3. Configure transmission
I'll show only those strings in /opt/etc/transmission/settings.json which need to be changed:
where "download-dir" is a folder on USB drive where torrent content will be placed.
4. Configure Dropbox-Uploader
This part is a tricky one. Proceed here and create new Dropbox application by filling:
Installation is finished. Reboot router and try to place some *.torrent files to the "Applications/Torrents" folder in Dropbox account. They will disappear within five minutes. It means router is "took" them and start downloads. When downloading will be finished, a text file will be appeared in Dropbox folder, named as a finished torrent job. You may take a look inside (a job finish time will be there) and erase it.
You don't need a real IP or open ports to add new torrents. As always, you may point a web browser to <ip of router>:9091 from LAN to see current a torrents activity.
This solution uses Dropbox-Uploader which is already in Entware repo.
1. Prerequisites
asuswrt-merlin firmware on board and a USB drive with Entware installation.
2. Installation
Install necessary packages and fix root account for the cron service:
Code:
opkg install cron curl dropbox-uploader transmission-web
sed -i 's/root/admin/g' /opt/etc/crontab
Code:
#!/opt/bin/bash
if [ -z "$TR_TORRENT_NAME" ]
then
dropbox_uploader list | grep -iE "^ \[F\] .+\.torrent$" | \
sed "s|^ \[F\] ||g" | \
while read item
do
dropbox_uploader download "$item" "/opt/etc/transmission/watchdir/$item"
dropbox_uploader delete "$item"
done
else
echo "Donwload job done at `date`" > "/tmp/$TR_TORRENT_NAME.txt"
dropbox_uploader upload "/tmp/$TR_TORRENT_NAME.txt"
rm -f "/tmp/$TR_TORRENT_NAME.txt"
fi
Code:
chmod +x /opt/etc/cron.5mins/torrent-watch.sh
3. Configure transmission
I'll show only those strings in /opt/etc/transmission/settings.json which need to be changed:
Code:
...
"download-dir": "/tmp/mnt/MYUSBDRIVE/Torrents",
...
"script-torrent-done-enabled": true,
"script-torrent-done-filename": "/opt/etc/cron.5mins/torrent-watch.sh",
...
4. Configure Dropbox-Uploader
This part is a tricky one. Proceed here and create new Dropbox application by filling:
- App type: Core,
- App name: <You name it as you wish>,
- Permission type: App folder,
- Push "Create app",
- Name of app folder: Torrents (or any other you like),
- Press "Update".
- App key: value from previous step,
- App secret: from previous step too,
- Access level [a/f]: a,
- …it's ok? [y/n]: y,
- Token request. Please, copy URL from console to web browser and press "Allow" on the web page appeared. Only then return to router and press "Enter".
Installation is finished. Reboot router and try to place some *.torrent files to the "Applications/Torrents" folder in Dropbox account. They will disappear within five minutes. It means router is "took" them and start downloads. When downloading will be finished, a text file will be appeared in Dropbox folder, named as a finished torrent job. You may take a look inside (a job finish time will be there) and erase it.
You don't need a real IP or open ports to add new torrents. As always, you may point a web browser to <ip of router>:9091 from LAN to see current a torrents activity.
Last edited: