mirror of
				https://github.com/Ysurac/openmptcprouter-feeds.git
				synced 2025-03-09 15:40:03 +00:00 
			
		
		
		
	Set public IP in another place
This commit is contained in:
		
							parent
							
								
									843a4d968f
								
							
						
					
					
						commit
						5cfc6f1862
					
				
					 2 changed files with 4 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -9,9 +9,9 @@ log() {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
get_ip() {
 | 
			
		||||
	uci -q set openmptcprouter.vps.ipv4=$(wget -4 -qO- -T 3 http://ip.openmptcprouter.com)
 | 
			
		||||
	uci -q set openmptcprouter.vps.detected_public_ipv4=$(wget -4 -qO- -T 3 http://ip.openmptcprouter.com)
 | 
			
		||||
	if [ "$(sysctl -n net.ipv6.conf.all.disable_ipv6 | tr -d '\n')" = "0" ]; then
 | 
			
		||||
		uci -q set openmptcprouter.vps.ipv6=$(wget -6 -qO- -T 3 http://ip.openmptcprouter.com)
 | 
			
		||||
		uci -q set openmptcprouter.vps.detected_public_ipv6=$(wget -6 -qO- -T 3 http://ip.openmptcprouter.com)
 | 
			
		||||
	fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,8 @@
 | 
			
		|||
#!/bin/sh /etc/rc.common
 | 
			
		||||
# shellcheck disable=SC2039
 | 
			
		||||
# vim: set noexpandtab tabstop=4 shiftwidth=4 softtabstop=4 :
 | 
			
		||||
# Copyright (C) 2018 Ycarus (Yannick Chabanois) <ycarus@zugaina.org>
 | 
			
		||||
# Released under GPL 3. See LICENSE for the full terms.
 | 
			
		||||
 | 
			
		||||
# shellcheck disable=SC2034
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue