Fixed check_tmoutprofile and changed version numbering

This commit is contained in:
Jérémy Dubois 2021-09-17 17:15:19 +02:00
parent e0202f28ff
commit f1c63f827f
2 changed files with 16 additions and 2 deletions

View File

@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [21.09] - 2021-09-17
### Changed
- Changed version numbering to use year.month and be capable to know the age of the script
### Fixed
- Fixed check_tmoutprofile : Add "if" to check if file exists
## [6.9.1] - 2021-07-23
### Changed

View File

@ -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(){