diff --git a/bin/entrypoint-squid.sh b/bin/entrypoint-squid.sh index 325aea4..86b03f6 100755 --- a/bin/entrypoint-squid.sh +++ b/bin/entrypoint-squid.sh @@ -16,14 +16,11 @@ export HOSTNAME="${HOSTNAME:-$(hostname -f)}" __init() { mkdir -p "/config" "/data" - for dir in apache2 e2guardian squid squidguard; do + for dir in apache2 e2guardian squid c-icap; do if [ -f "/usr/local/share/squidFiles/$dir" ]; then - cp -Rf "/usr/local/share/squidFiles/$dir" "/config/$dir" + [ -f "/config/$dir" ] || cp -Rf "/usr/local/share/squidFiles/$dir" "/config/$dir" elif [ -d "/usr/local/share/squidFiles/$dir" ]; then - cp -Rf "/usr/local/share/squidFiles/$dir/." "/config/$dir/" - else - cp -Rf "/usr/local/share/squidFiles/data/." "/data/" - cp -Rf "/usr/local/share/squidFiles/config/." "/config/" + [ -d "/config/$dir" ] || cp -Rf "/usr/local/share/squidFiles/$dir/." "/config/$dir/" fi done