mirror of
				https://github.com/Ysurac/openmptcprouter-feeds.git
				synced 2025-03-09 15:40:03 +00:00 
			
		
		
		
	Check if omr-bypass rules are set, if not restart
This commit is contained in:
		
							parent
							
								
									751f236fc8
								
							
						
					
					
						commit
						1608feff4c
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -848,6 +848,11 @@ if [ -n "$(logread | tail -n 2 | grep 'Ring expansion failed')" ]; then
 | 
			
		|||
	echo 1 > /sys/bus/pci/rescan
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [ "$(iptables-save | grep omr-bypass)" = "" ]; then
 | 
			
		||||
	_log "Can't find omr-bypass rules, restart omr-bypass..."
 | 
			
		||||
	/etc/init.d/omr-bypass
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [ "$(pgrep openmptcprouter-vps)" = "" ] && ([ "$(uci -q show openmptcprouter | grep get_config=\'1\')" != "" ] || [ "$(uci -q show openmptcprouter | grep admin_error=\'1\')" != "" ]); then
 | 
			
		||||
	/etc/init.d/openmptcprouter-vps restart >/dev/null 2>&1
 | 
			
		||||
	sleep 5
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue