Earlier quoted context omitted.
The goal here is to make it automatically update the hosts file once in a while
Isn’t that what cron is for?
Yes, obviously cron would work. If systemd can do what this dev needs, what's the harm?
51–60 of 97 posts
Earlier quoted context omitted.
The goal here is to make it automatically update the hosts file once in a while
Isn’t that what cron is for?
Yes, obviously cron would work. If systemd can do what this dev needs, what's the harm?
Earlier quoted context omitted.
Systemd has a cron system too. I’m just guessing, but it might be easier to programmatically install a systemd cron job (and making sure it runs) than doing so for the old/conventional crond?
Just using cron is back compatible
* Not running if the network is down.
* Not running if the download path isn't available.
* Running if the machine was off during the scheduled time.
* Monitoring and retry logic.
* Logging to syslog.
* Resource constraints.
* Random wait.
It ends up being a lot of code factored out of the actual application.
Earlier quoted context omitted.
If I considered constructing a botnet of Linux workstations, your software would be an excellent candidate.
You could say the same thing about Ansible, or Chef or Puppet or any of the other millions of systems automation tools available. There are lots of ways to misuse software, I don't think that that should preclude people from writing it.
Serious question. We all realize that the economics of the internet is largely fueled by ads, so why are we so keen to block them? It’s ad revenue that have allowed technology to flourish so strongly over the last two decades.
Earlier quoted context omitted.
You could say the same thing about Ansible, or Chef or Puppet or any of the other millions of systems automation tools available. There are lots of ways to misuse software, I don't think that that should preclude people from writing it.
I'm quite precise about about what these tools can and cannot do on my systems. Downloading random files form the Internet isn't on the list. When you hand over the control of the hosts file to someone else, you're basically transfer control of your DNS queries.
How is this different or better than Steven Black's project? Repo: https://github.com/StevenBlack/hosts
Earlier quoted context omitted.
This is actually sent to the IP address 0.0.0.0, it roughly means that all the traffic of the listed hosts is routed back to localhost
In this context, it actually means a "non-routable meta-address used to designate an invalid, unknown, or non-applicable target" [1] - 127.0.0.1 is localhost, 0.0.0.0 is its own thing. [1]: https://www.howtogeek.com/225487/what-is-the-difference-betw...
Since accepting Host files from someone on the internet can be dangerous I dug into the code: The list of hosts to exclude comes from several sites here: https://github.com/anned20/begoneads/blob/2c90fcee221edf71f8... The actual application of the hosts file is here: https://github.com/anned20/begoneads/blob/2c90fcee221edf71f8... I missed something though. Is a simple domain name per line enough to send that content…
I think you may be misreading the code. It concatenates the host files at the various URLs and then inserts their contents into /etc/hosts. I only looked at a couple of those files but the ones I did used either 0.0.0.0 or 127.0.0.1 as an address combined with a domain. To be honest, this code is over-engineered. It could be a single script with a handful of functions. At the same time, it’s missing functionality suc…
How is this different or better than Steven Black's project? Repo: https://github.com/StevenBlack/hosts
To be completely fair with you, I didn't know this was out there. Then again, I think my solution is more elegant, especially if all the todo's are finished.