mirror of
				https://github.com/Ysurac/openmptcprouter-feeds.git
				synced 2025-03-09 15:40:03 +00:00 
			
		
		
		
	Restart VPN only if key exist
This commit is contained in:
		
							parent
							
								
									1df4ef7aab
								
							
						
					
					
						commit
						d6a25fefc0
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -728,7 +728,7 @@ if [ "$(pgrep ss-redir)" = "" ] && [ "$(pgrep ss-local)" = "" ] && [ "$(uci -q g
 | 
			
		|||
	/etc/init.d/shadowsocks-libev restart
 | 
			
		||||
	sleep 5
 | 
			
		||||
fi
 | 
			
		||||
if [ "$(pgrep glorytun)" = "" ] && [ "$(uci -q get glorytun.vpn.enable)" = "1" ] && [ -f /etc/init.d/glorytun ]; then
 | 
			
		||||
if [ "$(pgrep glorytun)" = "" ] && [ "$(uci -q get glorytun.vpn.enable)" = "1" ] && [ -f /etc/init.d/glorytun ] && [ "$(uci -q get glorytun.vpn.key)" != "" ]; then
 | 
			
		||||
	_log "Can't find Glorytun, restart it..."
 | 
			
		||||
	/etc/init.d/glorytun restart
 | 
			
		||||
	/etc/init.d/glorytun-udp restart
 | 
			
		||||
| 
						 | 
				
			
			@ -749,12 +749,12 @@ if [ "$(pgrep openvpn)" = "" ] && [ -f /etc/init.d/openvpn ]; then
 | 
			
		|||
	fi
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [ "$(pgrep mlvpn)" = "" ] && [ "$(uci -q get mlvpn.general.enable)" = "1" ] && [ -f /etc/init.d/mlvpn ]; then
 | 
			
		||||
if [ "$(pgrep mlvpn)" = "" ] && [ "$(uci -q get mlvpn.general.enable)" = "1" ] && [ -f /etc/init.d/mlvpn ] && [ "$(uci -q get mlvpn.general.password)" != "" ]; then
 | 
			
		||||
	_log "Can't find MLVPN, restart it..."
 | 
			
		||||
	/etc/init.d/mlvpn restart
 | 
			
		||||
	sleep 5
 | 
			
		||||
fi
 | 
			
		||||
if [ "$(pgrep dsvpn)" = "" ] && [ "$(uci -q get dsvpn.vpn.enable)" = "1" ] && [ -f /etc/init.d/dsvpn ]; then
 | 
			
		||||
if [ "$(pgrep dsvpn)" = "" ] && [ "$(uci -q get dsvpn.vpn.enable)" = "1" ] && [ -f /etc/init.d/dsvpn ] && [ "$(uci -q get dsvpn.vpn.key)" != "" ]; then
 | 
			
		||||
	_log "Can't find DSVPN, restart it..."
 | 
			
		||||
	/etc/init.d/dsvpn restart
 | 
			
		||||
	sleep 5
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue