luci/applications/luci-app-mwan3/root/etc/uci-defaults/60_luci-mwan3
Florian Eckert b228700610 luci-app-mwan3: fix uci-defaults script rename initial_source to local_source
Rename wrong uci option

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2017-09-05 06:55:46 +02:00

21 lines
493 B
Bash
Executable file

#!/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.local_source="none" >/dev/null
uci commit mwan3
}
# remove LuCI cache
rm -rf /tmp/luci-indexcache /tmp/luci-modulecache
exit 0