Browse Source

Handle case of busybox netstat, with no pid support

jtbr 8 years ago
parent
commit
f21dd9117d
1 changed files with 5 additions and 1 deletions
  1. 5 1
      acme.sh

+ 5 - 1
acme.sh

@@ -1131,8 +1131,12 @@ _ss() {
       elif netstat -help 2>&1 | grep -- '-P protocol' >/dev/null; then
         #for solaris
         netstat -an -P tcp | grep "\.$_port " | grep "LISTEN"
-      else
+      elif netstat -help 2>&1 | grep "\-p" > /dev/null; then
+        #for full linux
         netstat -ntpl | grep ":$_port "
+      else
+        #for busybox (embedded linux; no pid support)
+        netstat -ntl 2>/dev/null | grep ":$_port "
       fi
     fi
     return 0