Editing /etc/hosts-file
Verfasst: 21 Jan 2020, 14:56
Hello
I am trying to create a new product-package that blocks certain websites from being displayed.
I have read that the "easiest/best" way to achieve this, is to edit the /etc/hosts-file like such:
What would be the correct approach to this task? Using "loadTextFile" to read the .txt-file into separate strings and then write them somehow?
I am trying to create a new product-package that blocks certain websites from being displayed.
I have read that the "easiest/best" way to achieve this, is to edit the /etc/hosts-file like such:
I need to create a package that can add these lines (perhaps from a .txt-file?) and remove them again, without removing other lines in the file.
What would be the correct approach to this task? Using "loadTextFile" to read the .txt-file into separate strings and then write them somehow?