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.
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>>".
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):
5) Make all scripts executable.
6) Reboot router.
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: