forked from freifunk-franken/firmware
Adrian Schmutzler
0475fe01f0
If /etc/config/nodewatcher already exists, a proper uci-defaults script should not overwrite it. Since this package is the owner of the config file, this change won't change anything for the current firmware, but will allow to use this as a package, too. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Reviewed-by: Robert Langhammer <rlanghammer@web.de>
17 lines
489 B
Plaintext
17 lines
489 B
Plaintext
[ -s /etc/config/nodewatcher ] && exit 0
|
|
|
|
touch /etc/config/nodewatcher
|
|
|
|
uci batch >/dev/null <<EOF
|
|
add nodewatcher script
|
|
set nodewatcher.@script[-1].data_file='/tmp/crawldata/node.data'
|
|
set nodewatcher.@script[-1].status_text_file='/tmp/status.txt'
|
|
add nodewatcher network
|
|
set nodewatcher.@network[-1].mesh_interface='br-client'
|
|
set nodewatcher.@network[-1].iface_blacklist='lo ifb0'
|
|
set nodewatcher.@network[-1].ip_whitelist='br-client'
|
|
EOF
|
|
uci commit nodewatcher
|
|
|
|
exit 0
|