🗃️ modified: bin/entrypoint-squid.sh 🗃️

This commit is contained in:
Jason 2022-02-17 16:17:23 -05:00
parent 12586d6ea2
commit 2b386815ce
No known key found for this signature in database
GPG Key ID: 4F765975C1F0EE5F

View File

@ -22,11 +22,12 @@ __init() {
elif [ -d "/usr/local/share/squidFiles/config/$dir" ]; then elif [ -d "/usr/local/share/squidFiles/config/$dir" ]; then
[ -d "/config/$dir" ] || cp -Rf "/usr/local/share/squidFiles/config/$dir/." "/config/$dir/" [ -d "/config/$dir" ] || cp -Rf "/usr/local/share/squidFiles/config/$dir/." "/config/$dir/"
else else
cp -Rf "/usr/local/share/squidFiles/data/." "/data/"
[ -e "/config/$dir" ] || cp -Rf "/usr/local/share/squidFiles/config/$dir" "/config/$dir" [ -e "/config/$dir" ] || cp -Rf "/usr/local/share/squidFiles/config/$dir" "/config/$dir"
fi fi
done done
[ -d "/data/htdocs" ] || cp -Rf "/usr/local/share/squidFiles/data/htdocs/." "/data/htdocs/"
mkdir -p "/data/log/squidguard" "/data/log/e2guardian" "/data/squidguard/db" "/data/log/c-icap" 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"
@ -119,11 +120,12 @@ bash | shell | sh)
[ -f "/var/run/apache2.pid" ] && rm -R /var/run/apache2.pid [ -f "/var/run/apache2.pid" ] && rm -R /var/run/apache2.pid
apache2 -D FOREGROUND -f "/config/apache2/apache2.conf" & apache2 -D FOREGROUND -f "/config/apache2/apache2.conf" &
echo "Starting squid..."
squid -f "/config/squid/squid.conf" -NYCd 1 ${EXTRA_ARGS} &
echo "Starting e2guardian..." echo "Starting e2guardian..."
e2guardian -N -c "/config/e2guardian/e2guardian.conf" & e2guardian -N -c "/config/e2guardian/e2guardian.conf" &
echo "Starting squid..." sleep 30 && exec tail -f /data/log/*/*
squid -f "/config/squid/squid.conf" -NYCd 1 ${EXTRA_ARGS} &
exec tail -f /data/log/*/*
;; ;;
esac esac