- Fix duplicate function.
This commit is contained in:
@@ -791,38 +791,6 @@ network_dst_address_refresh()
|
||||
|
||||
|
||||
|
||||
#--------------------------------------------------------------------------------------------------------------------------
|
||||
# network_dst_address_refresh
|
||||
#--------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
network_dst_address_refresh()
|
||||
{
|
||||
local dst_id="$1"
|
||||
local dst_host_name="$2"
|
||||
local dst_ip_old="$3"
|
||||
|
||||
local dst_ip_new
|
||||
local proxy_host="proxy${dst_id}.not.rx3"
|
||||
local proxy_port=8080
|
||||
|
||||
|
||||
dst_ip_new=$( nc ${proxy_host} ${proxy_port})
|
||||
|
||||
if [[ "${dst_ip_old}" != "${dst_ip_new}" ]]
|
||||
then
|
||||
${LOG} "Update ${dst_host_name}: Old: [${dst_ip_old}] New: [${dst_ip_new}]"
|
||||
${DEBUG} /usr/local/sbin/ip_host_update "${dst_host_name/.*}" "${dst_host_name#*.}" "${dst_ip_new}" 60
|
||||
|
||||
tab_assign NETWORK_DST_TAB "${dst_id},IP" "${dst_ip_new}"
|
||||
else
|
||||
${LOG} "Skiping ${dst_host_name}: IP: [${dst_ip_old}]"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#--------------------------------------------------------------------------------------------------------------------------
|
||||
# network_dst_address_refresh_all
|
||||
#--------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -175,7 +175,7 @@ case "$1" in
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|status|dump|table_set}"
|
||||
echo "Usage: $0 {start|stop|restart|status|dump|table_set|refresh_address}"
|
||||
RETVAL=1
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user