firmware/src/packages/fff/fff-nodewatcher/files/etc/uci-defaults/93-fff-nodewatcher
Adrian Schmutzler 1c3243dd18 fff-nodewatcher: Tidy up uci-defaults script
This solves the following issues with the uci-defaults script in
fff-nodewatcher:

- Remove /bin/sh in non-executable file
- Only commit to changed config
- Use "-1" for uci node indexing, as this will be the node just
  created

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-19 15:44:08 +02:00

13 lines
350 B
Plaintext

touch /etc/config/nodewatcher
uci batch <<EOF
add nodewatcher script
set nodewatcher.@script[-1].error_level='0'
set nodewatcher.@script[-1].logfile='/var/log/nodewatcher.log'
set nodewatcher.@script[-1].data_file='/tmp/crawldata/node.data'
set nodewatcher.@script[-1].status_text_file='/tmp/status.txt'
EOF
uci commit nodewatcher
exit 0