forked from freifunk-franken/firmware
Store api key of router owner to be able to use netmons new REST API
This commit is contained in:
parent
66d46b1860
commit
f592a8ae09
|
@ -10,6 +10,7 @@ config 'api'
|
||||||
option 'ipv6_address' 'fe80::201:2ff:fe03:405'
|
option 'ipv6_address' 'fe80::201:2ff:fe03:405'
|
||||||
option 'timeout' '5'
|
option 'timeout' '5'
|
||||||
option 'retry' '5'
|
option 'retry' '5'
|
||||||
|
option 'api_key' '1'
|
||||||
|
|
||||||
config 'crawl'
|
config 'crawl'
|
||||||
option 'method' 'hash'
|
option 'method' 'hash'
|
||||||
|
|
|
@ -84,12 +84,13 @@ assign_router() {
|
||||||
err "Failure on router_auto_assign: $errstr. Exiting"
|
err "Failure on router_auto_assign: $errstr. Exiting"
|
||||||
exit 0
|
exit 0
|
||||||
elif [ "$ret" = "success" ]; then
|
elif [ "$ret" = "success" ]; then
|
||||||
update_hash=${ergebnis%;*}
|
update_hash=${ergebnis%;*;*}
|
||||||
update_hash=${update_hash##*;}
|
update_hash=${update_hash##*;}
|
||||||
|
api_key=${ergebnis##*;}
|
||||||
#write new config
|
#write new config
|
||||||
uci set configurator.@crawl[0].router_id=$errstr
|
uci set configurator.@crawl[0].router_id=$errstr
|
||||||
uci set configurator.@crawl[0].update_hash=$update_hash
|
uci set configurator.@crawl[0].update_hash=$update_hash
|
||||||
|
uci set configurator.@api[0].api_key=$api_key
|
||||||
#set also new router id for nodewatcher
|
#set also new router id for nodewatcher
|
||||||
#uci set nodewatcher.@crawl[0].router_id=$errstr
|
#uci set nodewatcher.@crawl[0].router_id=$errstr
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user