Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Boelen <michael.boelen@cisofy.com>2019-07-12 15:38:52 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2019-07-12 15:38:52 +0300
commit76e84f4b566531dce3bc1ff9bce7722718df2df3 (patch)
treeb2f3e73e77f8f39d8ee279fa69f33cd665b73760 /include/parameters
parentc31c6a5a9eb6d4a197b3774de2fe95b50e7928d3 (diff)
Run non-interactive by default, use --wait to enforce waiting after finishing a group of tests
Diffstat (limited to 'include/parameters')
-rw-r--r--include/parameters14
1 files changed, 11 insertions, 3 deletions
diff --git a/include/parameters b/include/parameters
index 0798224e..001044a5 100644
--- a/include/parameters
+++ b/include/parameters
@@ -233,7 +233,7 @@
# Cronjob support
--cron-job | --cronjob | --cron)
CRONJOB=1
- CHECK=1; QUICKMODE=1; COLORS=0; NEVERBREAK=1 # Use some defaults (-c, -Q, no colors)
+ CHECK=1; COLORS=0; NEVERBREAK=1 # Use some defaults ('audit system', -Q, no colors)
RemoveColors
;;
@@ -345,7 +345,6 @@
# Quiet mode
--quiet | -q | --silent)
QUIET=1
- QUICKMODE=1 # Run non-interactive
;;
# Non-interactive mode
@@ -444,7 +443,6 @@
# Warnings
--warnings-only | --show-warnings-only)
SHOW_WARNINGS_ONLY=1
- QUICKMODE=1
QUIET=1
;;
@@ -465,5 +463,15 @@
done
+ # Ensure non-interactive mode when running quietly or as cronjob
+ if [ ${CRONJOB} -eq 1 -o ${QUIET} -eq 1 ]; then
+ if [ ${QUICKMODE} -eq 0 ]; then
+ if [ ${QUIET} -eq 0 ]; then
+ echo "Switched back to quick mode (cron/non-interactive/quiet)"
+ fi
+ QUICKMODE=1
+ fi
+ fi
+
#================================================================================
# Lynis - Security Auditing and System Hardening for Linux and UNIX - https://cisofy.com