Merge pull request #3 from Samson-W/master

Add use Chinese out for result log.
This commit is contained in:
citypw 2016-08-10 13:23:33 +08:00 committed by GitHub
commit dfe8b63f58
2 changed files with 8 additions and 5 deletions

View File

@ -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

View File

@ -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