Set default log directory, or allow it be set per OS

This commit is contained in:
Michael Boelen 2017-08-08 14:52:59 +02:00
parent 4660362e74
commit a547953d99
No known key found for this signature in database
GPG Key ID: 26141F77A09D7F04
3 changed files with 5 additions and 2 deletions

View File

@ -130,6 +130,7 @@ unset LANG
LMDBINARY=""
LMDFOUND=0
LOGFILE=""
LOGDIR=""
LOGTEXT=1
LSVGBINARY=""
MACHINEID=""

View File

@ -111,6 +111,7 @@
HARDWARE=$(uname -m)
FIND_BINARIES="whereis -b"
SYSCTL_READKEY=""
LOGDIR="/var/adm/syslog"
;;
# Linux

5
lynis
View File

@ -297,9 +297,10 @@ ${NORMAL}
DiscoverProfiles
# Initialize and check profile file, auditor name, log file and report file
if [ -z "${LOGDIR}" ]; then LOGDIR="/var/log"; fi
if [ -z "${AUDITORNAME}" ]; then AUDITORNAME="[Not Specified]"; fi
if [ -z "${LOGFILE}" ]; then LOGFILE="/var/log/lynis.log"; fi
if [ -z "${REPORTFILE}" ]; then REPORTFILE="/var/log/lynis-report.dat"; fi
if [ -z "${LOGFILE}" ]; then LOGFILE="${LOGDIR}/lynis.log"; fi
if [ -z "${REPORTFILE}" ]; then REPORTFILE="${LOGDIR}/lynis-report.dat"; fi
#
#################################################################################
#