fix: implement checkTMP
This commit is contained in:
@@ -136,7 +136,15 @@ function checkLogs {
|
||||
}
|
||||
function checkTMP {
|
||||
# Check the /tmp directory to ensure it is empty. Warn on any files found.
|
||||
return 1
|
||||
if [[ -n "$(ls -A /tmp)" ]]; then
|
||||
echo -en "\e[93m[WARN]\e[0m /tmp directory is not empty; Contents\n"
|
||||
ls -A /tmp
|
||||
((WARN++))
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo -en "\e[32m[PASS]\e[0m /tmp directory is empty\n"
|
||||
return 0
|
||||
}
|
||||
function checkRoot {
|
||||
user="root"
|
||||
@@ -595,6 +603,9 @@ checkUsers
|
||||
echo -en "\n\nChecking the root account...\n"
|
||||
checkRoot
|
||||
|
||||
echo -en "\n\nChecking the /tmp directory...\n"
|
||||
checkTMP
|
||||
|
||||
checkAgent
|
||||
|
||||
# Summary
|
||||
|
||||
Reference in New Issue
Block a user