mirror of
https://github.com/CISOfy/lynis.git
synced 2025-04-08 17:15:25 +02:00
Preparations for compressed uploads
This commit is contained in:
parent
040c2efc1c
commit
c12a4403aa
include
@ -60,7 +60,7 @@ unset LANG
|
||||
COMPLIANCE_ENABLE_PCI_DSS=0
|
||||
COMPLIANCE_TESTS_PERFORMED=0
|
||||
COMPLIANCE_FINDINGS_FOUND=0
|
||||
COMPRESSED_UPLOADS=1
|
||||
COMPRESSED_UPLOADS=0
|
||||
CONTROL_URL_APPEND=""
|
||||
CONTROL_URL_PREPEND=""
|
||||
CSUMBINARY=""
|
||||
|
@ -137,12 +137,13 @@ output "Settings file: ${SETTINGS_FILE}"
|
||||
output "${WHITE}Found hostid: ${HOSTID}${NORMAL}"
|
||||
# Try to connect
|
||||
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
|
||||
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
|
||||
CURL_OPTIONS="${CURL_OPTIONS} --compressed"
|
||||
CURL_OPTIONS="${CURL_OPTIONS} --compressed -H 'Content-Encoding: gzip'"
|
||||
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`
|
||||
EXITCODE=$?
|
||||
if [ ${EXITCODE} -gt 0 ]; then
|
||||
|
@ -175,7 +175,7 @@
|
||||
|
||||
# Compression of uploads (enabled by default)
|
||||
upload_compressed)
|
||||
if [ "${VALUE}" = "0" ]; then COMPRESSED_UPLOADS=1 ]; fi
|
||||
if [ "${VALUE}" = "0" ]; then COMPRESSED_UPLOADS=0; fi
|
||||
;;
|
||||
|
||||
# Options during upload of data
|
||||
|
Loading…
x
Reference in New Issue
Block a user