mirror of
				https://github.com/hiskang/acme.sh
				synced 2025-11-03 20:07:43 +00:00 
			
		
		
		
	Handle case of busybox netstat, with no pid support
This commit is contained in:
		
							parent
							
								
									52cdedcba0
								
							
						
					
					
						commit
						f21dd9117d
					
				
							
								
								
									
										6
									
								
								acme.sh
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								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
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user