mirror of
				https://github.com/Ysurac/openmptcprouter-feeds.git
				synced 2025-03-09 15:40:03 +00:00 
			
		
		
		
	Only change multipath off if no already off
This commit is contained in:
		
							parent
							
								
									d5568cd6c8
								
							
						
					
					
						commit
						a64f26620b
					
				
					 1 changed files with 6 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -61,18 +61,17 @@ default_gw=$(ip route show default | grep -v metric | awk '/default/ {print $3}'
 | 
			
		|||
# An interface in error will never be used in MPTCP
 | 
			
		||||
if [ "$OMR_TRACKER_STATUS" = "ERROR" ]; then
 | 
			
		||||
	if [ -d "/sys/class/net/$OMR_TRACKER_DEVICE" ]; then
 | 
			
		||||
		#[ "$multipath_status" = "off" ] && exit 0
 | 
			
		||||
		#_log "$OMR_TRACKER_DEVICE switched off"
 | 
			
		||||
		multipath "$OMR_TRACKER_DEVICE" off
 | 
			
		||||
		[ "$multipath_status" = "off" ] || {
 | 
			
		||||
			_log "$OMR_TRACKER_DEVICE switched off"
 | 
			
		||||
			multipath "$OMR_TRACKER_DEVICE" off
 | 
			
		||||
			config_load shadowsocks-libev
 | 
			
		||||
			config_foreach del_ss_route server
 | 
			
		||||
		}
 | 
			
		||||
	fi
 | 
			
		||||
	if [ "$default_gw" = "$OMR_TRACKER_DEVICE_GATEWAY" ] || [ "$default_gw" = "" ]; then
 | 
			
		||||
		config_load network
 | 
			
		||||
		config_foreach set_route interface $OMR_TRACKER_INTERFACE
 | 
			
		||||
	fi
 | 
			
		||||
	if [ -d "/sys/class/net/$OMR_TRACKER_DEVICE" ]; then
 | 
			
		||||
		config_load shadowsocks-libev
 | 
			
		||||
		config_foreach del_ss_route server
 | 
			
		||||
	fi
 | 
			
		||||
	exit 0
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue