mirror of
				https://github.com/Ysurac/openmptcprouter-feeds.git
				synced 2025-03-09 15:40:03 +00:00 
			
		
		
		
	Display type in log for omr-tracker-ss
This commit is contained in:
		
							parent
							
								
									9c2f6605b6
								
							
						
					
					
						commit
						53261a11d2
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -101,7 +101,7 @@ while true; do
 | 
			
		|||
	if [ "$(curl -s -I -w %{http_code} --socks5 ${proxy} --max-time ${timeout} $host -o /dev/null)" != "000" ]; then
 | 
			
		||||
		nocontact=""
 | 
			
		||||
		[ "${last}" -ge "${retry}" ] || [ "$(uci -q get openmptcprouter.omr.ss_${server})" = "" ] && {
 | 
			
		||||
			_log "Shadowsocks ${server} is up (can contact via http ${host})"
 | 
			
		||||
			_log "Shadowsocks $type ${server} is up (can contact via http ${host})"
 | 
			
		||||
			OMR_TRACKER_STATUS_MSG="Shadowsocks $type ${server} is up (can contact via http ${host})"
 | 
			
		||||
			uci -q set openmptcprouter.omr.ss_${server}="up"
 | 
			
		||||
			uci -q commit openmptcprouter.omr
 | 
			
		||||
| 
						 | 
				
			
			@ -140,8 +140,8 @@ while true; do
 | 
			
		|||
		last=$((last + 1 ))
 | 
			
		||||
		[ -z "$nocontact" ] && nocontact="$host" || nocontact="$nocontact, $host"
 | 
			
		||||
		[ "${last}" -ge "${retry}" ] && {
 | 
			
		||||
			if [ "$OMR_TRACKER_PREV_STATUS" != "ERROR" ] && [ -n "$($IPTABLES -w -t nat -L -n 2>/dev/null | grep ssr)" ] || [ -n "$(nft list ruleset 2>/dev/null | grep ss_r)" ] || [ -n "$(nft list ruleset 2>/dev/null | grep ssr_r)" ]; then
 | 
			
		||||
				_log "Shadowsocks ${server} is down (can't contact via http ${nocontact})"
 | 
			
		||||
			if [ "$OMR_TRACKER_PREV_STATUS" != "ERROR" ] && ([ -n "$($IPTABLES -w -t nat -L -n 2>/dev/null | grep ssr)" ] || [ -n "$(nft list ruleset 2>/dev/null | grep ss_r)" ] || [ -n "$(nft list ruleset 2>/dev/null | grep ssr_r)" ]); then
 | 
			
		||||
				_log "Shadowsocks $type ${server} is down (can't contact via http ${nocontact})"
 | 
			
		||||
				OMR_TRACKER_STATUS_MSG="Shadowsocks $type ${server} is down (can't contact via http ${nocontact})"
 | 
			
		||||
				uci -q set openmptcprouter.omr.ss_${server}="down"
 | 
			
		||||
				uci -q commit openmptcprouter.omr
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue