Use Proxy

This commit is contained in:
Martin Lablans 2022-10-06 10:02:41 +02:00
parent 28b6567840
commit 92f0cfb1c6
1 changed files with 2 additions and 2 deletions

View File

@ -35,8 +35,8 @@ function hc_send(){
if [ -n "$2" ]; then
MSG="$2\n\nDocker stats: $UPTIME"
echo -e "$MSG" | curl -s -o /dev/null -X POST --data-binary @- "$HCURL"/"$1" || log WARN "Monitoring failed: Unable to send data to $HCURL/$1"
echo -e "$MSG" | https_proxy=$HTTPS_PROXY_URL curl -s -o /dev/null -X POST --data-binary @- "$HCURL"/"$1" || log WARN "Monitoring failed: Unable to send data to $HCURL/$1"
else
curl -s -o /dev/null "$HCURL"/"$1" || log WARN "Monitoring failed: Unable to send data to $HCURL/$1"
https_proxy=$HTTPS_PROXY_URL curl -s -o /dev/null "$HCURL"/"$1" || log WARN "Monitoring failed: Unable to send data to $HCURL/$1"
fi
}