mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-27 07:44:14 +02:00
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
|
# Lynis
|
||||||
# ------------------
|
# ------------------
|
||||||
#
|
#
|
||||||
# Copyright 2007-2015, Michael Boelen (michael@cisofy.com)
|
# Copyright 2007-2015, Michael Boelen (michael.boelen@cisofy.com), CISOfy
|
||||||
# Web site: http://cisofy.com
|
# Web site: https://cisofy.com
|
||||||
#
|
#
|
||||||
# Lynis comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
|
# 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.
|
# 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}"
|
logtext "URL to upload to: ${UPLOAD_URL}"
|
||||||
|
|
||||||
# Additional options to curl
|
# Additional options to curl
|
||||||
CURL_OPTIONS=""
|
if [ "${UPLOAD_OPTIONS}" = "" ]; then
|
||||||
|
CURL_OPTIONS=""
|
||||||
|
else
|
||||||
|
CURL_OPTIONS="${UPLOAD_OPTIONS}"
|
||||||
|
fi
|
||||||
SETTINGS_FILE="${PROFILE}"
|
SETTINGS_FILE="${PROFILE}"
|
||||||
|
|
||||||
# Only output text to stdout if DEBUG mode is not used
|
# 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
|
# Extra the license key from the settings file
|
||||||
if [ "${LICENSE_KEY}" = "" ]; then
|
if [ "${LICENSE_KEY}" = "" ]; then
|
||||||
echo "Fatal: no license key found. Quitting.."
|
echo "Fatal: no license key found. Quitting.."
|
||||||
exit 1
|
ExitFatal
|
||||||
else
|
else
|
||||||
output "License key = ${LICENSE_KEY}"
|
output "License key = ${LICENSE_KEY}"
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user