immortalwrt/package/lean/luci-app-xlnetacc/root/etc/uci-defaults/luci-xlnetacc

23 lines
459 B
Bash
Executable File

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