Skip to content

Commit

Permalink
Merge pull request #3 from Samson-W/master
Browse files Browse the repository at this point in the history
Add use Chinese out for result log.
  • Loading branch information
citypw committed Aug 10, 2016
2 parents ebc86a2 + f911fe5 commit dfe8b63
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 1 addition & 2 deletions README.md
Expand Up @@ -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
Expand All @@ -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

Expand Down
10 changes: 7 additions & 3 deletions 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() {
Expand All @@ -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
Expand All @@ -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
;;
Expand All @@ -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
Expand Down

0 comments on commit dfe8b63

Please sign in to comment.