mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-25 14:54:32 +02:00
Add USR1 trap to show status such as active test
This commit is contained in:
parent
cb52e9bfbe
commit
a07fcb3348
@ -98,6 +98,7 @@
|
|||||||
# ShowComplianceFinding Display a particular finding regarding compliance or a security standard
|
# ShowComplianceFinding Display a particular finding regarding compliance or a security standard
|
||||||
# ShowSymlinkPath Show a path behind a symlink
|
# ShowSymlinkPath Show a path behind a symlink
|
||||||
# SkipAtomicTest Test if a subtest needs to be skipped
|
# SkipAtomicTest Test if a subtest needs to be skipped
|
||||||
|
# Status Show execution status, such as active test being performed
|
||||||
# StoreNginxSettings Save parsed nginx settings to file
|
# StoreNginxSettings Save parsed nginx settings to file
|
||||||
# TestValue Evaluate a value in a string or key
|
# TestValue Evaluate a value in a string or key
|
||||||
# ViewCategories Show available category of tests
|
# ViewCategories Show available category of tests
|
||||||
@ -3383,6 +3384,22 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# Name : Status()
|
||||||
|
# Description : Reports back the status of tool
|
||||||
|
#
|
||||||
|
# Returns : text to screen
|
||||||
|
# Notes : kill --signal USR1 <PID> or pkill --signal USR1 lynis
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
Status() {
|
||||||
|
echo ""
|
||||||
|
echo "Date / time : $(date "+%Y-%m-%d %H:%M:%S")"
|
||||||
|
echo "Active test : ${TEST_NO:-NONE}"
|
||||||
|
echo ""
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Name : StoreNginxSettings()
|
# Name : StoreNginxSettings()
|
||||||
# Description : Store parsed settings from nginx (by ParseNginx)
|
# Description : Store parsed settings from nginx (by ParseNginx)
|
||||||
|
1
lynis
1
lynis
@ -249,6 +249,7 @@
|
|||||||
#################################################################################
|
#################################################################################
|
||||||
#
|
#
|
||||||
trap CleanUp INT TERM
|
trap CleanUp INT TERM
|
||||||
|
trap Status USR1
|
||||||
|
|
||||||
# Use safe umask for the files we create
|
# Use safe umask for the files we create
|
||||||
umask 027
|
umask 027
|
||||||
|
Loading…
x
Reference in New Issue
Block a user