[K12OSN] rsyncing blacklists from mesd

Bill Bardon bill at computassist.com
Wed Jun 22 20:18:40 UTC 2005


On Wednesday, Jun 22 Rob Owens wrote:
> 1)  How often should I rsync my blacklist?

Don't know the answer to this one.  Will be interested to find out
myself.

> 2)  Should I use the --delete option?
No.  The --delete is an rsync option that works on a file-by-file basis,
so would do you no good if you're just rsyncing one tar file.

> 3)  When I rsync'd the first time, the owner and group
> for all files and directories showed up on my machine
> as "23".  Is the proper way to solve this to write a
> script which rsyncs and then changes the ownership to
> something that makes sense to my machine, or is there
> a better way?

I have a script that came with the Debian install of squidguard that
does pretty much just what you described.  It sets the correct owner and
permissions, then updates the squidguard db files and restarts squid.
Note, it doesn't included the rsync itself.

Since it's so small, I can quote the whole thing here:

#! /bin/sh
# db update script
#

echo -n "Double checking directory and file permissions..."
chown -R proxy.proxy /var/lib/squidguard/db >/dev/null 2>&1
chmod 2770 /var/lib/squidguard/db >/dev/null 2>&1
echo "done!"
echo -n "Re-building SquidGuard db files..."
su - proxy -c "squidGuard -C all" >/dev/null 2>&1
su - proxy -c "squidGuard -u" >/dev/null 2>&1
echo "done!"
if [ -e /etc/init.d/squid ]; then
        echo -n "Reloading Squid..."
        /etc/init.d/squid reload >/dev/null 2>&1
        echo "done!"
fi

Make sure if you use this that all paths are correct for your system,
and that the owner is supposed to be "proxy".  I think that's a
Debianism, and K12LTSP uses a different account.


-- 
Bill Bardon
COMPUTASSIST
Omaha, Nebraska
http://www.computassist.com




More information about the K12OSN mailing list