Asad Ali
Very Senior Member
Hello All,
Ok so I'm using a sendmail script to email me every time by OpenVPN instance is connected and I use this string " nvram get vpn_client1_rip " to get my VPN public IP but the problem is that variable is not updating on its own when the router connects to OpenVPN and I receive an empty field in my email where it should show IP address.
I did some testing and what I find out is that variable is only updating when I go to the routers OpenVPN statistics page and after that whenever I execute the sendmail script I see the Public IP as it should.
I'm not sure if its the default behavior or if its a bug in the implementation but is there any way I can force update that variable directly from the script before fetching it?
Ok so I'm using a sendmail script to email me every time by OpenVPN instance is connected and I use this string " nvram get vpn_client1_rip " to get my VPN public IP but the problem is that variable is not updating on its own when the router connects to OpenVPN and I receive an empty field in my email where it should show IP address.
I did some testing and what I find out is that variable is only updating when I go to the routers OpenVPN statistics page and after that whenever I execute the sendmail script I see the Public IP as it should.
I'm not sure if its the default behavior or if its a bug in the implementation but is there any way I can force update that variable directly from the script before fetching it?