What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

[TUTORIAL] Transmission blocklist autoupdate

noric

Senior Member
This is a very simple piece of code I've written. It implies that you have already set up Transmission's blocklist. This code will only update the blocklist for you once a week (on Sunday at 5 a.m.) and give you confirmation in the router's log.

1) open a telnet session and install transmission-remote. I've done this with Entware but you can search google to do the same with Optware.

Code:
opkg install transmission-remote

2) Complete the following script by writing your Transmission username and password, separated by ":". In case your Transmission isn't account-restricted, just delete "-n <<USERNAME>>:<<PASSWORD>>".

Code:
#!/bin/sh

transmission-remote -n <<USERNAME>>:<<PASSWORD>> --blocklist-update | grep "responded: \"success\""

if [ "$?" == "0" ]; then
	data=$(date)
	echo ${data:4:15} Transmission blocklist successfully updated! >> /tmp/syslog.log
else
	data=$(date)
	echo ${data:4:15} ATTENTION!!! Couldn't update Transmission blocklist! >> /tmp/syslog.log
fi

3) Save the above script as BlocklistUpdate.sh and move it to /jffs/scripts.

4) Add the following code to the services-start script (google if you don't know how to do it):
Code:
/usr/sbin/cru a BlocklistUpdate "0 5 * * 0 /jffs/scripts/BlocklistUpdate.sh"
wait

5) Make all scripts executable.
Code:
chmod a+rx /jffs/scripts/*

6) Reboot router.
 
Last edited:

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top