Set logfile and reportfile to /dev/null in pentesting mode if they are empty

This commit is contained in:
mboelen 2014-09-08 15:51:11 +02:00
parent 284337be1b
commit 2373590be9
1 changed files with 6 additions and 0 deletions

6
lynis
View File

@ -157,6 +157,12 @@
echo ""; echo ""
exit 1
fi
# Disable logging if no alternative was provided
if [ ${PENTESTINGMODE} -eq 1 ]; then
if [ "${LOGFILE}" = "" ]; then LOGFILE="/dev/null"; fi
if [ "${REPORTFILE}" = "" ]; then REPORTFILE="/dev/null"; fi
fi
#
#################################################################################
#