I created two scripts:
_start_.sh
cp /etc/dansguardian/exceptionsitenoon.noon /etc/dansguardian/exceptionsitenoon
/usr/sbin/dansguardian -g
_stop_.sh
cp /etc/dansguardian/exceptionsitenoon.normal /etc/dansguardian/exceptionsitenoon
/usr/sbin/dansguardian -g
And added this line in /etc/dansguardian/exceptionsitelist:
.Include </etc/dansguardian/exceptionsitenoon>
Then, crontab -e
min hr * * * /path/to/_start_.sh
min hr * * * /path/to/_stop_.sh
And, of course, made a file
/etc/dansguardian/exceptionsitenoon.noon
that had a list of the domains I wanted to allow (for my case, at noon) and another /etc/dansguardian/exceptionsitenoon.normal
that was empty. The reason I used the .Include
option was that I wanted to keep the permanent exceptions separate and manageable from the temporary exceptions -- If not, I'd have to make updates to both "noon" and "normal" lists every time I needed to make a permanent exclusion.
No comments:
Post a Comment