I have kids in the house who I want to stop from watching stuff on youtube and other sites.
I have added youtube to my hosts file, which blocks it. Works well until I want to watch something myself.
I'd like to have a script that I can invoke the host with the block and then run it again and it lifts the block.
My thought is to have two files, hosts and hosts.BAK
The idea is to have the script rename hosts to hosts.BAK and hosts.BAK to hosts, with one file having blocked content and the other file not having blocked stuff. I don't know how to make the files change simultaneously, being that I cannot copy hosts to hosts.BAK then hosts.BAK already exists.
I'm probably missing something really quite simple, but I'm still missing it.