60_luci-mwan3 493 B

123456789101112131415161718192021
  1. #!/bin/sh
  2. # replace existing mwan ucitrack entry
  3. uci -q batch <<-EOF >/dev/null
  4. del ucitrack.@mwan3[-1]
  5. add ucitrack mwan3
  6. set ucitrack.@mwan3[-1].exec="/usr/sbin/mwan3 restart"
  7. commit ucitrack
  8. EOF
  9. uci -q get mwan3.globals >/dev/null || {
  10. uci -q add mwan3 globals >/dev/null
  11. uci -q rename mwan3.@globals[-1]="globals" >/dev/null
  12. uci -q set mwan3.globals.local_source="none" >/dev/null
  13. uci commit mwan3
  14. }
  15. # remove LuCI cache
  16. rm -rf /tmp/luci-indexcache /tmp/luci-modulecache
  17. exit 0