updated for wget

This commit is contained in:
2024-01-15 15:15:43 -05:00
parent dc530614d4
commit 69d9d8e790

View File

@@ -34,7 +34,7 @@ tmpdir=$(mktemp -d)
if [ -x /usr/bin/dpkg ]; then
tmpfile=$tmpdir/checkmkagent.deb
wget -O $tmpfile -H "${header}" "${url}/check_mk/api/1.0/domain-types/agent/actions/download/invoke?os_type=linux_deb"
wget -O $tmpfile --header="${header}" "${url}/check_mk/api/1.0/domain-types/agent/actions/download/invoke?os_type=linux_deb"
if dpkg -l check-mk-agent > /dev/null; then
dpkg -P check-mk-agent
fi
@@ -42,7 +42,7 @@ if [ -x /usr/bin/dpkg ]; then
dpkg -i $tmpfile
elif [ -x /usr/bin/rpm -o -x /bin/rpm ]; then
tmpfile=$tmpdir/checkmkagent.rpm
wget -O $tmpfile -H "${header}" "${url}/check_mk/api/1.0/domain-types/agent/actions/download/invoke?os_type=linux_rpm"
wget -O $tmpfile --header="${header}" "${url}/check_mk/api/1.0/domain-types/agent/actions/download/invoke?os_type=linux_rpm"
if rpm -q check-mk-agent > /dev/null; then
rpm -e check-mk-agent
fi