mirror of
https://github.com/ovh/debian-cis.git
synced 2024-11-25 06:54:29 +01:00
add --audit-all option
This commit is contained in:
parent
ccda7adb93
commit
8d84f38c97
@ -18,6 +18,7 @@ TOTAL_CHECKS=0
|
||||
TOTAL_TREATED_CHECKS=0
|
||||
AUDIT=0
|
||||
APPLY=0
|
||||
AUDIT_ALL=0
|
||||
|
||||
usage() {
|
||||
cat << EOF
|
||||
@ -40,6 +41,9 @@ while [[ $# > 0 ]]; do
|
||||
--audit)
|
||||
AUDIT=1
|
||||
;;
|
||||
--audit-all)
|
||||
AUDIT_ALL=1
|
||||
;;
|
||||
--apply)
|
||||
APPLY=1
|
||||
;;
|
||||
@ -76,6 +80,9 @@ for SCRIPT in $(ls $CIS_ROOT_DIR/bin/hardening/*.sh | sort -V); do
|
||||
if [ $AUDIT = 1 ]; then
|
||||
debug "$CIS_ROOT_DIR/bin/hardening/$SCRIPT --audit"
|
||||
$SCRIPT --audit
|
||||
elif [ $AUDIT_ALL = 1 ]; then
|
||||
debug "$CIS_ROOT_DIR/bin/hardening/$SCRIPT --audit-all"
|
||||
$SCRIPT --audit-all
|
||||
elif [ $APPLY = 1 ]; then
|
||||
debug "$CIS_ROOT_DIR/bin/hardening/$SCRIPT"
|
||||
$SCRIPT
|
||||
|
@ -26,6 +26,10 @@ fi
|
||||
while [[ $# > 0 ]]; do
|
||||
ARG="$1"
|
||||
case $ARG in
|
||||
--audit-all)
|
||||
debug "Audit all specified, setting status to audit regardless of configuration"
|
||||
status=audit
|
||||
;;
|
||||
--audit)
|
||||
if [ $status != 'disabled' -a $status != 'false' ]; then
|
||||
debug "Audit argument detected, setting status to audit"
|
||||
|
Loading…
Reference in New Issue
Block a user