feat(脚本): fix

pull/534/merge
mack-a 2020-10-19 20:56:16 +08:00
parent 4065e0f1fb
commit af26de8d40
1 changed files with 1 additions and 1 deletions

View File

@ -264,7 +264,7 @@ initTLSNginxConfig(){
}
# 检查ip
checkIP(){
pingIP=`ping -c 1 -W 1000 ${domain}|sed '1{s/[^(]*(//;s/).*//;q}'`
pingIP=`ping -c 1 -W 1000 ${domain}|sed '1{s/[^(]*(//;s/).*//;q;}'`
if [[ ! -z "${pingIP}" ]] && [[ `echo ${pingIP}|grep '^\([1-9]\|[1-9][0-9]\|1[0-9][0-9]\|2[0-4][0-9]\|25[0-5]\)\.\([0-9]\|[1-9][0-9]\|1[0-9][0-9]\|2[0-4][0-9]\|25[0-5]\)\.\([0-9]\|[1-9][0-9]\|1[0-9][0-9]\|2[0-4][0-9]\|25[0-5]\)\.\([0-9]\|[1-9][0-9]\|1[0-9][0-9]\|2[0-4][0-9]\|25[0-5]\)$'` ]]
then
read -p "当前域名的IP为 [${pingIP}],是否正确[y/n]" domainStatus