diff options
author | mboelen <michael@cisofy.com> | 2016-04-19 14:56:00 +0300 |
---|---|---|
committer | mboelen <michael@cisofy.com> | 2016-04-19 14:56:00 +0300 |
commit | 3008727ce0cf5b382e6c3139a443177191704a1c (patch) | |
tree | 3c79b6a7e61394094b757593c0e1ded5826b466f /include/data_upload | |
parent | a4c34aa0429b7a5b5ae90a8e48ddba73bedc07fe (diff) |
Log exit code of upload activities
Diffstat (limited to 'include/data_upload')
-rw-r--r-- | include/data_upload | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/data_upload b/include/data_upload index c90a3104..5b28bdb8 100644 --- a/include/data_upload +++ b/include/data_upload @@ -122,8 +122,8 @@ output "Settings file: ${SETTINGS_FILE}" LogText "Command used: ${CURLBINARY}${CURL_OPTIONS} -s -S --data-urlencode "licensekey=${LICENSE_KEY}" --data-urlencode "collector_version=${PROGRAM_VERSION}" ${LICENSE_SERVER_URL} 2> /dev/null" UPLOAD=`${CURLBINARY}${CURL_OPTIONS} -s -S --data-urlencode "licensekey=${LICENSE_KEY}" --data-urlencode "collector_version=${PROGRAM_VERSION}" ${LICENSE_SERVER_URL} 2> /dev/null` EXITCODE=$? + LogText "Exit code: ${EXITCODE}" if [ ${EXITCODE} -gt 0 ]; then - LogText "Exit code: ${EXITCODE}" echo "" echo "${RED}Upload Error${NORMAL}: License could not be checked. See ${LOGFILE} for details." @@ -196,6 +196,7 @@ output "Settings file: ${SETTINGS_FILE}" 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=$? + LogText "Exit code: ${EXITCODE}" if [ ${EXITCODE} -gt 0 ]; then echo "" echo "${RED}Upload Error${NORMAL}: cURL could not upload data. See ${LOGFILE} for details." |