mirror of
https://github.com/CISOfy/lynis.git
synced 2025-09-25 18:59:13 +02:00
Preparations for compressed uploads
This commit is contained in:
parent
040c2efc1c
commit
c12a4403aa
@ -60,7 +60,7 @@ unset LANG
|
|||||||
COMPLIANCE_ENABLE_PCI_DSS=0
|
COMPLIANCE_ENABLE_PCI_DSS=0
|
||||||
COMPLIANCE_TESTS_PERFORMED=0
|
COMPLIANCE_TESTS_PERFORMED=0
|
||||||
COMPLIANCE_FINDINGS_FOUND=0
|
COMPLIANCE_FINDINGS_FOUND=0
|
||||||
COMPRESSED_UPLOADS=1
|
COMPRESSED_UPLOADS=0
|
||||||
CONTROL_URL_APPEND=""
|
CONTROL_URL_APPEND=""
|
||||||
CONTROL_URL_PREPEND=""
|
CONTROL_URL_PREPEND=""
|
||||||
CSUMBINARY=""
|
CSUMBINARY=""
|
||||||
|
@ -137,12 +137,13 @@ output "Settings file: ${SETTINGS_FILE}"
|
|||||||
output "${WHITE}Found hostid: ${HOSTID}${NORMAL}"
|
output "${WHITE}Found hostid: ${HOSTID}${NORMAL}"
|
||||||
# Try to connect
|
# Try to connect
|
||||||
output "Uploading data.."
|
output "Uploading data.."
|
||||||
logtext "Command used: ${CURLBINARY} ${CURL_OPTIONS} -s -S --data-urlencode \"data@${REPORTFILE}\" --data-urlencode \"licensekey=${LICENSE_KEY}\" --data-urlencode \"hostid=${HOSTID}\" ${UPLOAD_URL}"
|
|
||||||
# Add a space
|
# Add a space
|
||||||
CURL_OPTIONS=" ${CURL_OPTIONS}"
|
CURL_OPTIONS=" ${CURL_OPTIONS}"
|
||||||
|
# Currently compressed uploads are not supported yet on central node. Therefore default value is set to 0.
|
||||||
if [ ${COMPRESSED_UPLOADS} -eq 1 ]; then
|
if [ ${COMPRESSED_UPLOADS} -eq 1 ]; then
|
||||||
CURL_OPTIONS="${CURL_OPTIONS} --compressed"
|
CURL_OPTIONS="${CURL_OPTIONS} --compressed -H 'Content-Encoding: gzip'"
|
||||||
fi
|
fi
|
||||||
|
logtext "Command used: ${CURLBINARY}${CURL_OPTIONS} -s -S --data-urlencode \"data@${REPORTFILE}\" --data-urlencode \"licensekey=${LICENSE_KEY}\" --data-urlencode \"hostid=${HOSTID}\" ${UPLOAD_URL}"
|
||||||
UPLOAD=`${CURLBINARY}${CURL_OPTIONS} -s -S --data-urlencode "data@${REPORTFILE}" --data-urlencode "licensekey=${LICENSE_KEY}" --data-urlencode "hostid=${HOSTID}" ${UPLOAD_URL} 2> /dev/null`
|
UPLOAD=`${CURLBINARY}${CURL_OPTIONS} -s -S --data-urlencode "data@${REPORTFILE}" --data-urlencode "licensekey=${LICENSE_KEY}" --data-urlencode "hostid=${HOSTID}" ${UPLOAD_URL} 2> /dev/null`
|
||||||
EXITCODE=$?
|
EXITCODE=$?
|
||||||
if [ ${EXITCODE} -gt 0 ]; then
|
if [ ${EXITCODE} -gt 0 ]; then
|
||||||
|
@ -175,7 +175,7 @@
|
|||||||
|
|
||||||
# Compression of uploads (enabled by default)
|
# Compression of uploads (enabled by default)
|
||||||
upload_compressed)
|
upload_compressed)
|
||||||
if [ "${VALUE}" = "0" ]; then COMPRESSED_UPLOADS=1 ]; fi
|
if [ "${VALUE}" = "0" ]; then COMPRESSED_UPLOADS=0; fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# Options during upload of data
|
# Options during upload of data
|
||||||
|
Loading…
x
Reference in New Issue
Block a user