Commit 76b7da9d authored by Bjoern Franke's avatar Bjoern Franke
Browse files

change api-host for configurator from ipv6-address to hostname

parent 36aca2b0
......@@ -7,7 +7,7 @@ config 'script'
config 'api'
option 'ipv4_address' '1'
option 'ipv6_interface' 'br-client'
option 'ipv6_address' 'fd74:fdaa:9dc4::1'
option 'ipv6_address' 'netmon.ffnw'
option 'timeout' '5'
option 'retry' '5'
option 'api_key' '1'
......
......@@ -154,7 +154,7 @@ autoadd_ipv6_address() {
sync_geo_location(){
if [[ $(awk 'BEGIN{srand();print int(rand()*100)}') -lt 5 ]];then
mac=$(uci get wireless.mesh_radio0.macaddr)
coords="$(wget -q -O - "http://[${API_IPV6_ADRESS}]/getcoords.php?mac=$mac")"
coords="$(wget -q -O - "http://${API_IPV6_ADRESS}/getcoords.php?mac=$mac")"
echo "$coords" | grep "[0-9]\{1,3\}\(\.[0-9]\)* [0-9]\{1,3\}\(\.[0-9]\)*"
if [ "$?" = "0" ]; then
lat="$(echo "$coords" | cut -d' ' -f1)"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment