mirror of https://github.com/CISOfy/lynis.git
Log exit code of upload activities
This commit is contained in:
parent
a4c34aa042
commit
3008727ce0
|
@ -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=$?
|
||||
if [ ${EXITCODE} -gt 0 ]; then
|
||||
LogText "Exit code: ${EXITCODE}"
|
||||
if [ ${EXITCODE} -gt 0 ]; then
|
||||
|
||||
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."
|
||||
|
|
Loading…
Reference in New Issue