summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-mwan3/root/etc/uci-defaults/60_luci-mwan3
blob: 509a69436486d38da24856c7e5ffc4341bc5aace (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

# replace existing mwan ucitrack entry
uci -q batch <<-EOF >/dev/null
	del ucitrack.@mwan3[-1]
	add ucitrack mwan3
	set ucitrack.@mwan3[-1].exec="/usr/sbin/mwan3 restart"
	commit ucitrack
EOF

uci -q get mwan3.globals >/dev/null || {
	uci -q add mwan3 globals >/dev/null
	uci -q rename mwan3.@globals[-1]="globals" >/dev/null
	uci -q set mwan3.globals.initial_source="none" >/dev/null
	uci commit mwan3
}

# remove LuCI cache
rm -rf /tmp/luci-indexcache /tmp/luci-modulecache

exit 0