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>2014-08-26 19:33:55 +0400
committermboelen <michael@cisofy.com>2014-08-26 19:33:55 +0400
commitc0ae2e217b7f1fb0171017ce5afb8eb8898470db (patch)
tree545aa150c35c5fb74d7bb4c2d3b0ae41cfa7b4e5 /include/tests_custom.template
Initial import
Diffstat (limited to 'include/tests_custom.template')
-rw-r--r--include/tests_custom.template59
1 files changed, 59 insertions, 0 deletions
diff --git a/include/tests_custom.template b/include/tests_custom.template
new file mode 100644
index 00000000..b6686494
--- /dev/null
+++ b/include/tests_custom.template
@@ -0,0 +1,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