Merge pull request #1375 from StevenHessing/luci-app-noddos
[project/luci.git] / applications / luci-app-mwan3 / root / etc / uci-defaults / 60_luci-mwan3
1 #!/bin/sh
2
3 # replace existing mwan ucitrack entry
4 uci -q batch <<-EOF >/dev/null
5         del ucitrack.@mwan3[-1]
6         add ucitrack mwan3
7         set ucitrack.@mwan3[-1].exec="/usr/sbin/mwan3 restart"
8         commit ucitrack
9 EOF
10
11 uci -q get mwan3.globals >/dev/null || {
12         uci -q add mwan3 globals >/dev/null
13         uci -q rename mwan3.@globals[-1]="globals" >/dev/null
14         uci -q set mwan3.globals.local_source="none" >/dev/null
15         uci commit mwan3
16 }
17
18 # remove LuCI cache
19 rm -rf /tmp/luci-indexcache /tmp/luci-modulecache
20
21 exit 0