mirror of https://github.com/CISOfy/lynis.git
Allow overriding CURL options with parameter and exit cleanly when license is not found
This commit is contained in:
parent
b41d12d077
commit
554d8bd857
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue