Rename Maid to CleanUp

This commit is contained in:
Michael Boelen 2016-07-05 12:16:49 +02:00
parent b5b8861368
commit fbd24b585a
2 changed files with 20 additions and 20 deletions

View File

@ -28,9 +28,10 @@
# AddSystemGroup Adds a system to a group
# CheckFilePermissions Check file permissions
# CheckUpdates Determine if a new version of Lynis is available
# CreateTempFile Create a temporary file
# CleanUp Clean up files before closing program
# CountTests Count number of performed tests
# ContainsString Find the needle (string) in the haystack (another string)
# CreateTempFile Create a temporary file
# Debug Display additional information on the screen (not suited for cronjob)
# DigitsOnly Return only the digits from a string
# DirectoryExists Check if a directory exists on the disk
@ -43,12 +44,12 @@
# FileIsEmpty Check if a file is empty
# FileIsReadable Check if a file is readable or directory accessible
# GetHostID Retrieve an unique ID for this host
# InsertSection Insert a section block
# InsertPluginSection Insert a section block for plugins
# IsDebug Check if --debug is used
# IsDeveloperMode Check if --developer is used
# IsDeveloperVersion Check if program is a developer release
# IsRunning Check if a process is running
# InsertSection Insert a section block
# InsertPluginSection Insert a section block for plugins
# IsOwnedByRoot Determine if file or directory is owned by root
# IsVerbose Check if --verbose is used
# IsVirtualMachine Check if this system is a virtual machine
@ -57,7 +58,6 @@
# IsWorldWritable Check if a file is world writable
# LogText Log text strings to logfile, prefixed with date/time
# LogTextBreak Insert a separator in log file
# Maid
# ParseNginx Parse nginx configuration lines
# ParseTestValues Parse a set of values
# PortIsListening Check if machine is listening on specified protocol and port
@ -226,6 +226,21 @@
}
################################################################################
# Name : CleanUp()
# Description : Cleanup service
# Returns : <nothing>
################################################################################
CleanUp() {
echo ""; echo "Interrupt detected."
RemovePIDFile
RemoveTempFiles
Display --text "Cleaning up..." --result DONE --color GREEN
ExitFatal
}
################################################################################
# Name : ContainsString()
# Description : Search a specific string (or regular expression) in another
@ -1302,21 +1317,6 @@
}
################################################################################
# Name : Maid()
# Description : Cleanup service
# Returns : <nothing>
################################################################################
Maid() {
echo ""; echo "Interrupt detected."
RemovePIDFile
RemoveTempFiles
Display --text "Cleaning up..." --result DONE --color GREEN
ExitFatal
}
################################################################################
# Name : ParseTestValues()
# Description : Parse nginx configuration lines

2
lynis
View File

@ -194,7 +194,7 @@ Make sure to execute ${PROGRAM_NAME} from untarred directory or check your insta
#
#################################################################################
#
trap Maid INT
trap CleanUp INT
# Use safe umask for the files we create
umask 027