Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormboelen <michael@cisofy.com>2015-01-30 21:58:00 +0300
committermboelen <michael@cisofy.com>2015-01-30 21:58:00 +0300
commit554d8bd857a8e201bd840a360166d914bdede6a4 (patch)
tree5390413027c0f40f520730460790c1d25e78edd8 /include/data_upload
parentb41d12d077acf8c3fb29b2f8327fde88d3980f45 (diff)
Allow overriding CURL options with parameter and exit cleanly when license is not found
Diffstat (limited to 'include/data_upload')
-rw-r--r--include/data_upload12
1 files changed, 8 insertions, 4 deletions
diff --git a/include/data_upload b/include/data_upload
index 8008feae..7105900d 100644
--- a/include/data_upload
+++ b/include/data_upload
@@ -5,8 +5,8 @@
# Lynis
# ------------------
#
-# Copyright 2007-2015, Michael Boelen (michael@cisofy.com)
-# Web site: http://cisofy.com
+# Copyright 2007-2015, Michael Boelen (michael.boelen@cisofy.com), CISOfy
+# Web site: https://cisofy.com
#
# Lynis comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
# welcome to redistribute it under the terms of the GNU General Public License.
@@ -30,7 +30,11 @@ logtext "Upload server: ${LICENSE_SERVER} (static)"
logtext "URL to upload to: ${UPLOAD_URL}"
# Additional options to curl
-CURL_OPTIONS=""
+if [ "${UPLOAD_OPTIONS}" = "" ]; then
+ CURL_OPTIONS=""
+ else
+ CURL_OPTIONS="${UPLOAD_OPTIONS}"
+fi
SETTINGS_FILE="${PROFILE}"
# Only output text to stdout if DEBUG mode is not used
@@ -59,7 +63,7 @@ output "Settings file: ${SETTINGS_FILE}"
# Extra the license key from the settings file
if [ "${LICENSE_KEY}" = "" ]; then
echo "Fatal: no license key found. Quitting.."
- exit 1
+ ExitFatal
else
output "License key = ${LICENSE_KEY}"
fi