diff --git a/roles/evocheck/files/evocheck.sh b/roles/evocheck/files/evocheck.sh index f0800d5..a0853d1 100644 --- a/roles/evocheck/files/evocheck.sh +++ b/roles/evocheck/files/evocheck.sh @@ -3,7 +3,7 @@ # EvoCheck # Script to verify compliance of an OpenBSD server powered by Evolix -readonly VERSION="6.9.1" +readonly VERSION="21.09" # Disable LANG* @@ -114,7 +114,11 @@ check_noatime(){ } check_tmoutprofile(){ - grep -q TMOUT= /etc/skel/.profile /root/.profile || failed "IS_TMOUTPROFILE" "In order to fix, add 'export TMOUT=36000' to both /etc/skel/.profile and /root/.profile files" + if [ -f /etc/skel/.profile ] + grep -q TMOUT= /etc/skel/.profile /root/.profile || failed "IS_TMOUTPROFILE" "In order to fix, add 'export TMOUT=36000' to both /etc/skel/.profile and /root/.profile files" + else + failed "IS_TMOUTPROFILE" "File /etc/skel/.profile does not exist. Both /etc/skel/.profile and /root/.profile should contain at least 'export TMOUT=36000'" + fi } check_raidok(){