mirror of
				https://github.com/Ysurac/openmptcprouter-feeds.git
				synced 2025-03-09 15:40:03 +00:00 
			
		
		
		
	Fix find gateway in some cases
This commit is contained in:
		
							parent
							
								
									6001c2f1a7
								
							
						
					
					
						commit
						0db896540c
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -292,6 +292,9 @@ while true; do
 | 
			
		|||
				if [ -z "$OMR_TRACKER_DEVICE_GATEWAY" ]; then
 | 
			
		||||
					OMR_TRACKER_DEVICE_GATEWAY=$(ip -4 r list dev "$OMR_TRACKER_DEVICE" | grep -m 1 default | awk '/via/ {print $3}' | tr -d "\n")
 | 
			
		||||
				fi
 | 
			
		||||
				if [ -z "$OMR_TRACKER_DEVICE_GATEWAY" ]; then
 | 
			
		||||
					OMR_TRACKER_DEVICE_GATEWAY=$(ip -4 r list dev "$OMR_TRACKER_DEVICE" | awk '/via/ {print $3}' | tr -d "\n")
 | 
			
		||||
				fi
 | 
			
		||||
			fi
 | 
			
		||||
			if [ "$OMR_TRACKER_IPV6" = "1" ] || [ "$OMR_TRACKER_IPV6" = "auto" ]; then
 | 
			
		||||
				#OMR_TRACKER_DEVICE_IP6=$(ip -6 -br addr ls dev "$OMR_TRACKER_DEVICE" | awk -F'[ /]+' '{print $3}')
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue