Where can I add a script
Renaud (Ron) OLGIATI <renaud-9qJ39Kf4vhh95CE/QLhGvQK61p16E/[email protected]>
| Newsgroups | gmane.comp.security.ipcop.user |
|---|---|
| Message-ID | <[email protected]> |
For years I have been blocking adds on my LAN using on my IPCop box an extended /etc/hosts file, which holds around 250.000 lines like
127.0.0.7 www.doubleclick.com
Up to now this was done by running a cron job evey ten minutes, which launches a script:
#!/bin/bash
# Append my blacklist of hosts from /var/tmp/badhosts to /etc/hosts if hosts.cgi
# has been run to update /var/ipcop/main/hosts.
if [[ ! /var/ipcop/main/hosts -ot /etc/hosts ]]
then
cat /var/tmp/badhosts >> /etc/hosts
/usr/bin/killall -s HUP dnsmasq
fi
This works, but is not satisfying: misuse of resources, up to ten minutes without protection after updating the hosts file through the GUI.
So I was wondering: would it be possible to launch the script from hosts.cgi whenever this is run, and so run it only once, immediately after the /etc/hosts file has been re-created ?
Cheers,
Ron.
--
The trouble with some women
is that they get all excited about nothing,
and then marry him.
-- Cher
-- http://www.olgiati-in-paraguay.org --
------------------------------------------------------------------------------
_______________________________________________
IPCop-user mailing list
[email protected]
Manage your subscription or unsubscribe
https://lists.sourceforge.net/lists/listinfo/ipcop-user