Last active
February 2, 2021 11:40
-
-
Save omtinez/8e05f4609cec76edb00d9420234b2ac3 to your computer and use it in GitHub Desktop.
Blacklist auto-update for SquidGuard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Configure this section according to your system settings | |
squidGuardpath="/usr/bin/squidGuard" | |
squidpath="/usr/sbin/squid3" | |
httpget="/usr/bin/wget" | |
tarpath="/bin/tar" | |
chownpath="/bin/chown" | |
dbhome="/var/lib/squidguard/db" # same as squidguard.conf | |
squidGuardowner="proxy:www" | |
workdir="/tmp" | |
# download actual shalla's blacklist | |
shallalist="http://www.shallalist.de/Downloads/shallalist.tar.gz" | |
$httpget $shallalist -O $workdir/shallalist.tar.gz || exit 1 | |
$tarpath xzf $workdir/shallalist.tar.gz -C $workdir || exit 1 | |
# create new local database | |
rm -r $dbhome | |
mv $workdir/BL $dbhome | |
# clean-up | |
$squidGuardpath -C all | |
$chownpath -R $squidGuardowner $dbhome | |
$squidpath -k reconfigure |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks man