mirror of https://github.com/CISOfy/lynis.git
Show warning when upload was not succesful
This commit is contained in:
parent
756c09cb4a
commit
ce0955d05c
|
@ -136,13 +136,12 @@ output "Settings file: ${SETTINGS_FILE}"
|
|||
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
|
||||
#UPLOAD_CODE=`echo ${UPLOAD} | head -n 1 | awk '{ print $2 }'`
|
||||
#output "Output code from upload: ${UPLOAD_CODE}"
|
||||
echo "${RED}Error: ${NORMAL}Error occurred, cURL ended during the upload of the report data."
|
||||
echo "Related exit code: ${EXITCODE}"
|
||||
echo "Check the last section of the log file for the exact command used, for further troubleshooting"
|
||||
echo "Debug:"
|
||||
echo ${UPLOAD}
|
||||
echo "${RED}Warning${NORMAL}: cURL could not upload data. See ${LOGFILE} for details."
|
||||
# Quit
|
||||
ExitClean
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue