diff --git a/README.md b/README.md index 3df0cc8..073cc61 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ Porting from DISA RHEL 6 STIG V1 R7. usage: check.sh [options] -c Output Log with catable colors + -C Use Chinese output Log with catable colors -s Perform STIG checking with NORMAL output log -v Show version -h Show this message @@ -25,8 +26,6 @@ STIG Check for Debian (v0.1) Port DISA RHEL 6 STIG V1R7 for Debian ``` -##Change language -Modify variable SETLANG in check.sh. ##Project Work diff --git a/check.sh b/check.sh index 2194469..9983bbf 100755 --- a/check.sh +++ b/check.sh @@ -1,11 +1,10 @@ #!/bin/bash - VERSION='0.1' DATE=`date +%F` LOG=/var/log/STIG-Checking-$DATE.log # support en(English) and cn(chinese) -SETLANG="cn" +SETLANG="en" # Script Version function version() { @@ -17,6 +16,7 @@ cat << EOF usage: $0 [options] -c Output Log with catable colors + -C Use Chinese output Log with catable colors -s Perform STIG checking with NORMAL output log -v Show version -h Show this message @@ -41,7 +41,7 @@ elif [ $# -gt 1 ];then exit 1 fi -while getopts ":csvhq" OPTION; do +while getopts ":csvhqC" OPTION; do case $OPTION in c) CATCOLOR=1 ;; @@ -55,6 +55,10 @@ while getopts ":csvhq" OPTION; do usage exit 0 ;; + C) + CATCOLOR=1 + SETLANG="CN" + ;; ?) tput setaf 1;echo -e "\033[1mERROR: Invalid Option Provided!\033[0m";tput sgr0 echo