Wednesday, March 25, 2009

Dansguardian schedule an exception during the day.

So, you're using dansguardian and would like to schedule an exception...

I created two scripts:

cp /etc/dansguardian/exceptionsitenoon.noon /etc/dansguardian/exceptionsitenoon
/usr/sbin/dansguardian -g

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/
min hr * * * /path/to/

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:

Blog Archive