Adblock Plugin

Want to share your OpenWrt / Gargoyle knowledge? Implemented a new feature? Let us know here.

Moderator: Moderators

pythonic
Posts: 159
Joined: Mon Mar 11, 2019 5:47 am
Location: Australia

Re: Adblock Plugin

Post by pythonic »

On at least some devices, the adblock lists don't seem to get updated as expected. I think this comes down to a path issue in the adblock cron entry.

The standard crontab entry set by /usr/lib/adblock/runadblock.sh is:

Code: Select all

0 4 * * 0 sh /plugin_root/usr/lib/adblock/runadblock.sh
However on affected devices the runadblock.sh script doesn't exist on that path in which case I think the cron entry should look like:

Code: Select all

0 4 * * 0 sh /usr/lib/adblock/runadblock.sh
If you're using the adblock plugin and the lists don't appear to be getting updated every Sunday, you can make the change at line 18 in /usr/lib/adblock/runadblock.sh from

Code: Select all

CRON="0 4 * * 0 sh /plugin_root/usr/lib/adblock/runadblock.sh"
to

Code: Select all

CRON="0 4 * * 0 sh /usr/lib/adblock/runadblock.sh"
and then disable then re-enable the plugin. You can also make a temporary change to the cron entry itself with an ssh connection and the command

Code: Select all

crontab -e
but be warned that it requires knowing how to use the vi text editor (unless you've made other arrangements)...

Lantis
Moderator
Posts: 6403
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Adblock Plugin

Post by Lantis »

Would that be a device which has had adblock installed as a default package?
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

pythonic
Posts: 159
Joined: Mon Mar 11, 2019 5:47 am
Location: Australia

Re: Adblock Plugin

Post by pythonic »

In the examples I've looked at, yes.

Lantis
Moderator
Posts: 6403
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Adblock Plugin

Post by Lantis »

Yea, i did a bang up job on that one (being my first plugin). It only works if it's installed as a plugin, and only if you don't use extroot. What a mess.
Needs a rewrite honestly :(
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

pythonic
Posts: 159
Joined: Mon Mar 11, 2019 5:47 am
Location: Australia

Re: Adblock Plugin

Post by pythonic »

While a re-write may well be warranted, I wouldn't be too harsh on yourself ;) as it seems to work ok within it's limitations and I don't think many have hit either the pre-installed or ext_root related problems.

If you want to check any of the other plugins that aren't usually built into official images, a "kitchen sink" image on a platform that doesn't usually have space restrictions might be handy for testing for such bugs - x86/amd64 would be one where this might be useful and my RPi builds are like this.

Post Reply