2018-01-11 17:38:01 -06:00

24 lines
486 B
Bash

#!/bin/sh
uci -q batch <<-EOF >/dev/null
delete ucitrack.@udp2raw[-1]
add ucitrack udp2raw
set ucitrack.@udp2raw[-1].init=udp2raw
commit ucitrack
EOF
general=$(uci -q get udp2raw.@general[-1])
if [ -z "$general" ]; then
uci -q add udp2raw general
fi
if [ ."$general" != ."general" ]; then
uci -q batch <<-EOF >/dev/null
rename udp2raw.@general[-1]="general"
set udp2raw.general.server="nil"
commit udp2raw
EOF
fi
rm -rf /tmp/luci-indexcache /tmp/luci-modulecache
exit 0