Referencing an open item we would like to modify the entrypoint.sh to pass proxy information into freshclam.conf
Files to modify:
entrypoint.sh
Description:
Following the pattern present in entrypoint.sh we would like to add a conditional to support an environment variable being set of $PROXY_SERVER. If the environment variables are set for $PROXY_PORT that can also be set, along with $PROXY_USERNAME and $PROXY_PASSWORD for the following items in freshclam.conf:
if [ -n "$PROXY_SERVER" ]; then
sed -i 's~^#HTTPProxyServer .*~HTTPProxyServer '"$PROXY_SERVER"'~g' /etc/clamav/freshclam.conf
# It's not required, but if they also provided a port, then configure it
if [ -n "$PROXY_PORT" ]; then
sed -i 's/^#HTTPProxyPort .*$/HTTPProxyPort '"$PROXY_PORT"'/g' /etc/clamav/freshclam.conf
fi
# It's not required, but if they also provided a username, then configure both the username and password
if [ -n "$PROXY_USERNAME" ]; then
sed -i 's/^#HTTPProxyUsername .*$/HTTPProxyUsername '"$PROXY_USERNAME"'/g' /etc/clamav/freshclam.conf
sed -i 's~^#HTTPProxyPassword .*~HTTPProxyPassword '"$PROXY_PASSWORD"'~g' /etc/clamav/freshclam.conf
fi
fi
Referencing an open item we would like to modify the
entrypoint.sh
to pass proxy information intofreshclam.conf
Files to modify:
entrypoint.sh
Description: Following the pattern present in
entrypoint.sh
we would like to add a conditional to support an environment variable being set of$PROXY_SERVER
. If the environment variables are set for$PROXY_PORT
that can also be set, along with$PROXY_USERNAME
and$PROXY_PASSWORD
for the following items infreshclam.conf
: