diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2017-04-30 18:59:35 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2017-04-30 18:59:35 +0300 |
commit | 4ecb9d4d05124b813cd4d7ddcaf5671c2f4c4765 (patch) | |
tree | 282f5a4e9e3530ada04d00bda3e8ac118cf70bbd /include/data_upload | |
parent | 5ccd0912cf74f5d3dd07e5ed5fe0e6a30571fbb5 (diff) |
[bulk change] cleaning up, code enhancements, initialization of variables, and new tests
Diffstat (limited to 'include/data_upload')
-rw-r--r-- | include/data_upload | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/data_upload b/include/data_upload index 90f58fd7..701827e5 100644 --- a/include/data_upload +++ b/include/data_upload @@ -38,7 +38,7 @@ # Additional options to curl if [ "${UPLOAD_OPTIONS}" = "" ]; then CURL_OPTIONS="" - else + else CURL_OPTIONS=" ${UPLOAD_OPTIONS}" fi @@ -62,7 +62,7 @@ # Check if we can find curl # Suggestion: If you want to keep the system hardened, copying the binary from a trusted source is a good alternative. # Restrict access to this binary to the user who is running this script. - if [ "${CURLBINARY}" = "" ]; then + if IsEmpty "${CURLBINARY}"; then echo "Fatal: can't find curl binary. Please install the related package or put the binary in the PATH. Quitting.." LogText "Error: Could not find cURL binary" exit 1 @@ -73,7 +73,7 @@ echo "Fatal: no license key found. Quitting.." LogText "Error: no license key was specified in the profile (${PROFILE})" ExitFatal - else + else Output "License key = ${LICENSE_KEY}" fi @@ -189,7 +189,7 @@ if [ "${UPLOAD_CODE}" = "100" ]; then Output "${WHITE}License is valid${NORMAL}" LogText "Result: license is valid" - else + else LogText "Result: error while checking license" LogText "Output: ${UPLOAD_CODE}" echo "${RED}Fatal error: ${WHITE}Error while checking the license.${NORMAL}" @@ -237,16 +237,16 @@ echo "" # Quit ExitClean - else + else Display --indent 2 --text "Data upload status" --result OK --color GREEN fi - else + else echo "${RED}Error${NORMAL}: No hostid and/or hostid2 found. Can not upload report file." echo "Suggested command: lynis show hostids" # Quit ExitFatal fi - else + else Output "${YELLOW}No report file found to upload.${NORMAL}" ExitFatal fi |