Reply To: Temporarily remove or switch ad blocking hosts file

#74875
sybok
Member

    If anyone is interested, I post 3 basic files and some test etc-hosts file that may provide the service-based solution.
    I thought it could be nice exercise.
    If you wish to test it, unpack and replace any occurrence of ‘/data/Scripts/EtcHostsAccordingToCurrentUser/’ by your test-folder.
    Disclaimer:
    There are few TODOs/things to clarify, the most crucial: which internet-related services need to be restarted (and how) after modifying ‘/etc/hosts’?
    Not fully tested but seems to work OK with the some basic tests.
    The scripts contain some debug-printing, mostly commented out to test the flow of the code.
    Also, the service file may serve as a template for some other projects.

    • This reply was modified 4 years, 8 months ago by sybok.
    • This reply was modified 4 years, 8 months ago by sybok. Reason: Mention TODO(s)