gaenserich / hostsblock

an ad- and malware-blocking script for Linux
https://github.com/gaenserich/hostsblock
225 stars 28 forks source link

dnscacher handling #26

Closed mkoskar closed 8 years ago

mkoskar commented 9 years ago

I believe that hostsblock.conf should mention dnscacher variable and its recognized values. In my case dnsmasq auto-configuration fails (due to non-standard dnsmasq config) so I set dnscacher=manual which works well up to the point of hostsblock trying to restart it resulting in:

[WARN] FAILED to restart manual.

That could be fixed by enhancing below test condition:

# IF WE HAVE A DNS CACHER, LET'S RESTART IT
if [ "$dnscacher" != "none" ]; then
    _notify 3 "Restarting $dnscacher..."
gaenserich commented 9 years ago

I think I might strip out the automatic detection of the dnscacher and just provide a configuration option to allow restarting it. That would make this much simpler.

pickfire commented 8 years ago

@gaenserich Yeah, I think the automatic detection of the dnscacher might be damaging, I hope that the README.md mention more about how it uses dnscacher too.

@mkoskar I agree about that, I am using dnsmasq to cache tor dns requests, I doesn't know much about dnscacher currently, need some research.

gaenserich commented 8 years ago

Indeed, a robust wiki is probably more beneficial than additional code.

gaenserich commented 8 years ago

Oh, and this was resolved a while back, though I got rid of the last vestige here: 4301a83