diff options
author | mboelen <michael@cisofy.com> | 2015-11-22 21:05:25 +0300 |
---|---|---|
committer | mboelen <michael@cisofy.com> | 2015-11-22 21:05:25 +0300 |
commit | ce0955d05c06f098447bbc158eb2262c6c630e56 (patch) | |
tree | affc519ffb9ebc1123e873375ff469d870d4d0d2 /include/data_upload | |
parent | 756c09cb4ac45277906f0941cdb61b795ed20348 (diff) |
Show warning when upload was not succesful
Diffstat (limited to 'include/data_upload')
-rw-r--r-- | include/data_upload | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/data_upload b/include/data_upload index cd5f0cda..4896052a 100644 --- a/include/data_upload +++ b/include/data_upload @@ -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 |