mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-11-10 00:11:45 +00:00
compatible for windows netstat tool
This commit is contained in:
parent
d3d884c16f
commit
ccb965359c
5
le.sh
5
le.sh
@ -183,7 +183,12 @@ _ss() {
|
|||||||
_port="$1"
|
_port="$1"
|
||||||
if command -v "netstat" >/dev/null 2>&1 ; then
|
if command -v "netstat" >/dev/null 2>&1 ; then
|
||||||
_debug "Using: netstat"
|
_debug "Using: netstat"
|
||||||
|
if netstat -h 2>&1 | grep "\-p proto" >/dev/null ; then
|
||||||
|
#for windows version netstat tool
|
||||||
|
netstat -nb -p tcp | grep :$_port" "
|
||||||
|
else
|
||||||
netstat -ntpl | grep :$_port" "
|
netstat -ntpl | grep :$_port" "
|
||||||
|
fi
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
if command -v "ss" >/dev/null 2>&1 ; then
|
if command -v "ss" >/dev/null 2>&1 ; then
|
||||||
|
Loading…
Reference in New Issue
Block a user