adblock-lean icon indicating copy to clipboard operation
adblock-lean copied to clipboard

Facilitate automated setup following sysypgrade

Open PerkelSimon opened this issue 8 months ago • 4 comments

Hi,

As discussed in the forum, after sysupgrade, we need to run sh /etc/init.d/adblock-lean setup as we can see here in the read.me

After completing sysupgrade, run the interactive setup again to re-enable adblock-lean: sh /etc/init.d/adblock-lean setup. To preserve your old config, answer e when asked this question: Generate [n]ew config or use [e]xisting config?

So is it possible to make a script to run sh /etc/init.d/adblock-lean setup + integrate the ''e'' as answer? thanks

PerkelSimon avatar Mar 23 '25 20:03 PerkelSimon

Any thoughts on this @friendly-bits?

lynxthecat avatar Apr 01 '25 14:04 lynxthecat

In general, I think it's in the best interest of the user to manually issue the setup command after sysupgrade and monitor the output to make sure that no errors are encountered. Even assuming that we can persistently guarantee compatibility with future generic OpenWrt versions, adblock-lean integrates with dnsmasq which is a critical system service, and we do not control all the possible variables at play here. For example, some users may do sysupgrade to a customized openwrt build where dnsmasq does not behave in a way which we expect. Or, for another example, some other software running automatically on first boot may reset /etc/config/dhcp after we create the addnmount entry, which will essentially disable blocklist compression.

So I'm a bit wary of having this functionality advertised as a supported feature because most users will not foresee the aforementioned implications.

That said, I do see the point of making sysupgrade easier for our users. Not really sure whether this outweighs the above considerations, though, especially considering that manually running 1 command and answering a few straightforward questions is not really tedious IMO.

friendly-bits avatar Apr 02 '25 02:04 friendly-bits

So what do you guys think? Personally, I'm in favor of not implementing this (for reasons listed above), but I'm open for discussion.

friendly-bits avatar Apr 07 '25 18:04 friendly-bits

IMO, I would have it as an opt in option, as I often forget to rerun the script between openwrt sysupgrades and this would be awesome to also facilitate getting the latest version of adblock-lean as well after the update. Just need to have a warning in the readme or config that doing such may cause issues and to recommend doing it manually after you finish the rest of your router setup.

CryoTheRenegade avatar Jun 01 '25 21:06 CryoTheRenegade