fix: implement checkTMP
This commit is contained in:
1 parent
26a536bc9b
commit
4b8ccfbf34
1 file changed
+12
-1
@@ -136,7 +136,15 @@ function checkLogs {
|
|||||||
}
|
}
|
||||||
function checkTMP {
|
function checkTMP {
|
||||||
# Check the /tmp directory to ensure it is empty. Warn on any files found.
|
# 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 {
|
function checkRoot {
|
||||||
user="root"
|
user="root"
|
||||||
@@ -595,6 +603,9 @@ checkUsers
|
|||||||
echo -en "\n\nChecking the root account...\n"
|
echo -en "\n\nChecking the root account...\n"
|
||||||
checkRoot
|
checkRoot
|
||||||
|
|
||||||
|
echo -en "\n\nChecking the /tmp directory...\n"
|
||||||
|
checkTMP
|
||||||
|
|
||||||
checkAgent
|
checkAgent
|
||||||
|
|
||||||
# Summary
|
# Summary
|
||||||
|
|||||||
Reference in new issue
Block a user