Yo peeps.
I created 2 host files and some short "sudo cp" scripts for them.
My intention is quite simple, one script is coping "allow" host to etc, second script is coping "disallow" host to etc.
So I want functionality like: I want some parental control I run - "disallow script", party time I run - "allow script".
Seems quite simple but.
Some times FF keeps something in cache so some sites still loading after I run a script, not all but some.
This is not what I want, Bleachbit or reboot helps but this is not what I want.
I am looking for command or program with similar functionality.
But command fixing caches is fine.
Thanks
Host file profile script.
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Host file profile script.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Host file profile script.
Hmm so i would have to add lines for browsers like:
rm ~/.mozilla/firefox/*.default/cookies.sqlite
There is any way to clean all at once ?
rm ~/.mozilla/firefox/*.default/cookies.sqlite
There is any way to clean all at once ?
Re: Host file profile script.
~/.mozilla/firefox/*.default/places.sqlite
is something I'd look at?Good luck.
Re: Host file profile script.
You have two /etc/hosts files and want to switch between them?
I'm seeing two internet answers:
- that changes to /etc/hosts take place immediately.
- that you need to restart networking to see the changes.
A better solution would be to set up two browser profiles, one with a lot of blocking and one without.
I moved all my blocked URLs from /etc/hosts to privoxy, the main advantage being that you can't use wildcards in /etc/hosts, but you can with privoxy.
It's real easy to set up two browser profiles
The first profile has lots of blocking: privoxy and adblock
The second doesn't use privoxy or adblock.
I'm seeing two internet answers:
- that changes to /etc/hosts take place immediately.
- that you need to restart networking to see the changes.
A better solution would be to set up two browser profiles, one with a lot of blocking and one without.
I moved all my blocked URLs from /etc/hosts to privoxy, the main advantage being that you can't use wildcards in /etc/hosts, but you can with privoxy.
It's real easy to set up two browser profiles
Code: Select all
firefox -P profile.default -new-instance
firefox -P profile.safemode -new-instance
The second doesn't use privoxy or adblock.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Your data and OS are backed up....right?
Re: Host file profile script.
Ahha I found it
sudo /etc/rc.d/init.d/nscd restart
sudo /etc/rc.d/init.d/nscd restart