forked from freifunk-franken/firmware
fastdstart: send geo location
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de> Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
This commit is contained in:
parent
5940b43765
commit
2d8fa07948
|
@ -66,7 +66,8 @@ if ping -w5 -c3 "$test_ipv4_host1" &>/dev/null ||
|
||||||
|
|
||||||
pubkey=$(fastd -c /etc/fastd/$project/$project.conf --show-key --machine-readable)
|
pubkey=$(fastd -c /etc/fastd/$project/$project.conf --show-key --machine-readable)
|
||||||
# port=666
|
# port=666
|
||||||
|
lat=$(uci get system.@system[0].latitude)
|
||||||
|
long=$(uci get system.@system[0].longitude)
|
||||||
|
|
||||||
# fire up
|
# fire up
|
||||||
if [ "$(/sbin/ifconfig -a | grep -i ethernet | grep $project)" = "" ]; then
|
if [ "$(/sbin/ifconfig -a | grep -i ethernet | grep $project)" = "" ]; then
|
||||||
|
@ -75,7 +76,7 @@ if ping -w5 -c3 "$test_ipv4_host1" &>/dev/null ||
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# register
|
# register
|
||||||
wget -T15 "http://keyserver.freifunk-franken.de/${project}/?mac=$mac&name=$hostname&port=$port&key=$pubkey" -O /tmp/fastd_${project}_output
|
wget -T15 "http://keyserver.freifunk-franken.de/${project}/geo.php?mac=$mac&name=$hostname&port=$port&key=$pubkey&lat=$lat&long=$long" -O /tmp/fastd_${project}_output
|
||||||
|
|
||||||
filenames=$(awk '/^####/ { gsub(/^####/, "", $0); gsub(/.conf/, "", $0); print $0; }' /tmp/fastd_${project}_output)
|
filenames=$(awk '/^####/ { gsub(/^####/, "", $0); gsub(/.conf/, "", $0); print $0; }' /tmp/fastd_${project}_output)
|
||||||
for file in $filenames; do
|
for file in $filenames; do
|
||||||
|
|
Loading…
Reference in New Issue