mirror of https://github.com/CISOfy/lynis.git
60 lines
2.4 KiB
Plaintext
60 lines
2.4 KiB
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
#################################################################################
|
||
|
#
|
||
|
# Lynis
|
||
|
# ------------------
|
||
|
#
|
||
|
# Copyright 2007-2014, Michael Boelen (michael@rootkit.nl), The Netherlands
|
||
|
# Web site: http://www.rootkit.nl
|
||
|
#
|
||
|
# 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.
|
||
|
# See LICENSE file for usage of this software.
|
||
|
#
|
||
|
#################################################################################
|
||
|
#
|
||
|
# Here could you insert your own custom checks
|
||
|
#
|
||
|
# Tips:
|
||
|
# - Make sure to use each test ID only once in Register function
|
||
|
# - Use big steps in numbering, so you can easily put tests in between
|
||
|
# - Want to improve Lynis? Share your checks!
|
||
|
#
|
||
|
#################################################################################
|
||
|
#
|
||
|
# This has already been inserted, but you might reuse it to split your tests
|
||
|
# InsertSection "Custom Checks"
|
||
|
#
|
||
|
#################################################################################
|
||
|
#
|
||
|
# Test : CUST-0010
|
||
|
# Description : Check for something interesting - template
|
||
|
# This test first checks if OpenSSL binary was found
|
||
|
if [ ! -z "${OPENSSLBINARY}" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
|
||
|
Register --test-no CUST-0010 --preqs-met ${PREQS_MET} --weight L --network NO --description "My description"
|
||
|
# Or you could use this one without any dependencies
|
||
|
# Register --test-no CUST-0010 --weight L --network NO --description "My description"
|
||
|
if [ ${SKIPTEST} -eq 0 ]; then
|
||
|
FOUND=0
|
||
|
logtext "Test: checking something"
|
||
|
ReportWarning ${TEST_NO} "M" "Test warning"
|
||
|
if [ ${FOUND} -eq 0 ]; then
|
||
|
Display --indent 4 --text "- Performing custom test 1..." --result OK --color GREEN
|
||
|
logtext "Result: the test looks great!"
|
||
|
else
|
||
|
Display --indent 4 --text "- Performing custom test 1..." --result WARNING --color RED
|
||
|
logtext "Result: hmm bad result of this test :("
|
||
|
ReportSuggestion ${TEST_NO} "This could be better!"
|
||
|
fi
|
||
|
fi
|
||
|
#
|
||
|
#################################################################################
|
||
|
#
|
||
|
|
||
|
wait_for_keypress
|
||
|
|
||
|
#
|
||
|
#================================================================================
|
||
|
# Lynis - Copyright 2007-2014, Michael Boelen - www.rootkit.nl - The Netherlands
|