mirror of
https://github.com/casjaysdevdocker/squidguard
synced 2025-01-18 00:34:24 -05:00
🗃️ modified: bin/create-blocklists.sh 🗃️
This commit is contained in:
parent
a485f34f87
commit
17463673f2
@ -6,7 +6,6 @@ REDIRECT_URL="${REDIRECT_URL:-}"
|
||||
BLOCKLIST="${BLOCKLIST:-https://github.com/casjay/resources/raw/main/files/shallalist.tar.gz}"
|
||||
BLOCKED_CATEGORIES="${BLOCKED_CATEGORIES:-adv,aggressive,porn,spyware,violence,warez}"
|
||||
|
||||
CONFIG_FILE="/etc/squidguard/squidGuard.conf"
|
||||
DB_LOCATION="/data/squidguard/db"
|
||||
LOG_LOCATION="/data/log"
|
||||
|
||||
@ -17,13 +16,6 @@ echo "Extracting blocklist..."
|
||||
mkdir -p /tmp/blocklist
|
||||
tar xzf /tmp/blocklist.tgz --strip-components=1 -C /tmp/blocklist
|
||||
|
||||
echo "Creating config file..."
|
||||
rm "${CONFIG_FILE}"
|
||||
touch "${CONFIG_FILE}"
|
||||
|
||||
echo "dbhome ${DB_LOCATION}" >>"${CONFIG_FILE}"
|
||||
echo "logdir ${LOG_LOCATION}" >>"${CONFIG_FILE}"
|
||||
|
||||
for CATEGORY in $(echo ${BLOCKED_CATEGORIES} | sed "s/,/ /g"); do
|
||||
if [ ! -d "/tmp/blocklist/${CATEGORY}" ]; then
|
||||
echo "Category ${CATEGORY} not available!"
|
||||
|
Loading…
x
Reference in New Issue
Block a user