From baafae0032fefe232a37cc9a380a71230ebbf031 Mon Sep 17 00:00:00 2001 From: Pat Riehecky Date: Feb 19 2020 20:25:06 +0000 Subject: Add in support for a proxy --- diff --git a/ocsinventory-agent.cron b/ocsinventory-agent.cron index b2528ac..a2f6792 100644 --- a/ocsinventory-agent.cron +++ b/ocsinventory-agent.cron @@ -27,6 +27,9 @@ do elif [ ! -z "${OCSSERVER[$i]}" ]; then # Remote inventory OPTS="$OPTS --lazy --nolocal --server=${OCSSERVER[$i]}" + if [ ! -z "${OCSPROXYSERVER[$i]}" ]; then + OPTS="$OPTS --proxy=${OCSPROXYSERVER[$i]}" + fi fi echo "[$(date '+%c')] Running $NAME $OPTS" diff --git a/ocsinventory-agent.spec b/ocsinventory-agent.spec index c22ce79..bf4c94b 100644 --- a/ocsinventory-agent.spec +++ b/ocsinventory-agent.spec @@ -190,6 +190,9 @@ OCSPAUSE[0]=100 # Administrative TAG (optional, must be filed before first inventory) OCSTAG[0]=%{?ocstag} + +# If you need an HTTP/HTTPS proxy, fill this out +# OCSPROXYSERVER='http://user:pass@proxy:port' EOF cat <%{name}.cfg @@ -302,6 +305,9 @@ rm %{buildroot}%{_sbindir}/ipdiscover %changelog +* Wed Jan 29 2020 Fedora Release Engineering - 2.6.0-5 +- Add OCSPROXYSERVER for http/s proxys + * Wed Jan 29 2020 Fedora Release Engineering - 2.6.0-4.2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild