mirror of
https://github.com/casjaysdevdocker/squidguard
synced 2025-01-18 12:34:24 -05:00
🗃️ modified: bin/entrypoint-squid.sh 🗃️
This commit is contained in:
parent
8518f6d794
commit
12586d6ea2
@ -17,19 +17,22 @@ __init() {
|
|||||||
mkdir -p "/config" "/data"
|
mkdir -p "/config" "/data"
|
||||||
|
|
||||||
for dir in apache2 e2guardian squid c-icap; do
|
for dir in apache2 e2guardian squid c-icap; do
|
||||||
if [ -f "/usr/local/share/squidFiles/$dir" ]; then
|
if [ -f "/usr/local/share/squidFiles/config/$dir" ]; then
|
||||||
[ -f "/config/$dir" ] || cp -Rf "/usr/local/share/squidFiles/$dir" "/config/$dir"
|
[ -f "/config/$dir" ] || cp -Rf "/usr/local/share/squidFiles/config/$dir" "/config/$dir"
|
||||||
elif [ -d "/usr/local/share/squidFiles/$dir" ]; then
|
elif [ -d "/usr/local/share/squidFiles/config/$dir" ]; then
|
||||||
[ -d "/config/$dir" ] || cp -Rf "/usr/local/share/squidFiles/$dir/." "/config/$dir/"
|
[ -d "/config/$dir" ] || cp -Rf "/usr/local/share/squidFiles/config/$dir/." "/config/$dir/"
|
||||||
|
else
|
||||||
|
cp -Rf "/usr/local/share/squidFiles/data/." "/data/"
|
||||||
|
[ -e "/config/$dir" ] || cp -Rf "/usr/local/share/squidFiles/config/$dir" "/config/$dir"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
mkdir -p "/data/log/squidguard" "/data/log/e2guardian" "/data/squidguard/db"
|
mkdir -p "/data/log/squidguard" "/data/log/e2guardian" "/data/squidguard/db" "/data/log/c-icap"
|
||||||
mkdir -p "${SQUID_LOG_DIR}" "${SQUID_CACHE_DIR}" "/data/log/apache2" "/data/htdocs/cgi-bin"
|
mkdir -p "${SQUID_LOG_DIR}" "${SQUID_CACHE_DIR}" "/data/log/apache2" "/data/htdocs/cgi-bin"
|
||||||
chown -Rf ${SQUID_USER}:${SQUID_USER} "/config" "/data"
|
chown -Rf ${SQUID_USER}:${SQUID_USER} "/config" "/data"
|
||||||
chown -Rf ${E2GUARD_USER}:${E2GUARD_USER} "/data/log/e2guardian" "/config/e2guardian"
|
chown -Rf ${E2GUARD_USER}:${E2GUARD_USER} "/data/log/e2guardian" "/config/e2guardian"
|
||||||
chown -Rf ${APACHE2_USER}:${APACHE2_USER} "/data/htdocs" "/config/apache2" "/data/log/apache2"
|
chown -Rf ${APACHE2_USER}:${APACHE2_USER} "/data/htdocs" "/config/apache2" "/data/log/apache2"
|
||||||
chmod -Rf 777 "${SQUID_LOG_DIR}" "${SQUID_CACHE_DIR}" "/data/log/e2guardian"
|
chmod -Rf 777 "${SQUID_LOG_DIR}" "${SQUID_CACHE_DIR}" "/data/log/e2guardian" "/data/log/c-icap"
|
||||||
|
|
||||||
if [ "${WPAD_IP}" != "" ]; then
|
if [ "${WPAD_IP}" != "" ]; then
|
||||||
sed 's/{{WPAD_IP}}/'"${WPAD_IP}"'/' -i "/data/htdocs/www/wpad.dat"
|
sed 's/{{WPAD_IP}}/'"${WPAD_IP}"'/' -i "/data/htdocs/www/wpad.dat"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user