blob: b66864942fff63e3ae5b07b6849d7093ba82b96e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
#!/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
|