mirror of
https://github.com/casjaysdevdocker/squidguard
synced 2025-01-18 18:34:29 -05:00
🗃️ modified: bin/entrypoint-squid.sh 🗃️
This commit is contained in:
parent
fb5ffd303e
commit
9e60f51e40
@ -22,7 +22,7 @@ __init() {
|
|||||||
cp -Rf "/usr/local/share/squidFiles/$dir/." "/config/$dir/"
|
cp -Rf "/usr/local/share/squidFiles/$dir/." "/config/$dir/"
|
||||||
else
|
else
|
||||||
cp -Rf "/usr/local/share/squidFiles/data/." "/data/"
|
cp -Rf "/usr/local/share/squidFiles/data/." "/data/"
|
||||||
cp -Rf "usr/local/share/squidFiles/config/." "/config/"
|
cp -Rf "/usr/local/share/squidFiles/config/." "/config/"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -58,6 +58,10 @@ __init() {
|
|||||||
|
|
||||||
cp -Rf "/config/." "/etc/"
|
cp -Rf "/config/." "/etc/"
|
||||||
|
|
||||||
|
if [ "$(find /data/squidguard/db/* 2>/dev/null | wc -l)" -eq 0 ]; then
|
||||||
|
/usr/local/bin/create-blocklists.sh
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "${UPDATE_BLACKLIST_URL}" != "" ]; then
|
if [ "${UPDATE_BLACKLIST_URL}" != "" ]; then
|
||||||
sudo wget -O /tmp/backlist.tar.gz ${UPDATE_BLACKLIST_URL} &&
|
sudo wget -O /tmp/backlist.tar.gz ${UPDATE_BLACKLIST_URL} &&
|
||||||
tar -xzf /tmp/backlist.tar.gz -C "/data/squidguard/db" &&
|
tar -xzf /tmp/backlist.tar.gz -C "/data/squidguard/db" &&
|
||||||
@ -75,10 +79,10 @@ __init() {
|
|||||||
|
|
||||||
# allow arguments to be passed to squid
|
# allow arguments to be passed to squid
|
||||||
if [[ ${1:0:1} = '-' ]]; then
|
if [[ ${1:0:1} = '-' ]]; then
|
||||||
EXTRA_ARGS="$@"
|
EXTRA_ARGS=("$@")
|
||||||
set --
|
set --
|
||||||
elif [[ ${1} == squid || ${1} == $(which squid) ]]; then
|
elif [[ ${1} == squid || ${1} == $(which squid) ]]; then
|
||||||
EXTRA_ARGS="${@:2}"
|
EXTRA_ARGS=("${@:2}")
|
||||||
set --
|
set --
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -114,6 +118,7 @@ bash | shell | sh)
|
|||||||
e2guardian -N -c "/config/e2guardian/e2guardian.conf" &
|
e2guardian -N -c "/config/e2guardian/e2guardian.conf" &
|
||||||
|
|
||||||
echo "Starting squid..."
|
echo "Starting squid..."
|
||||||
exec $(which squid) -f "/config/squid/squid.conf" -NYCd 1 ${EXTRA_ARGS}
|
squid -f "/config/squid/squid.conf" -NYCd 1 ${EXTRA_ARGS} &
|
||||||
|
exec tail -f /data/log/*/*
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
Loading…
x
Reference in New Issue
Block a user