local key=$1
local val=$2
- if ! uci -q get "luci.themes.$key" 2>/dev/null; then
- uci set "luci.themes.$key=$val"
+ if ! uci -q get "luci.$key" 2>/dev/null; then
+ uci set "luci.$key=$val"
changed=1
fi
}
-set_opt Bootstrap /luci-static/bootstrap
-set_opt BootstrapDark /luci-static/bootstrap-dark
-set_opt BootstrapLight /luci-static/bootstrap-light
+set_opt themes.Bootstrap /luci-static/bootstrap
-if [ "$PKG_UPGRADE" != 1 ]; then
- uci set luci.main.mediaurlbase=/luci-static/bootstrap
- changed=1
+if [ "$PKG_UPGRADE" != 1 ] && [ $changed = 1 ]; then
+ set_opt main.mediaurlbase /luci-static/bootstrap
fi
+set_opt themes.BootstrapDark /luci-static/bootstrap-dark
+set_opt themes.BootstrapLight /luci-static/bootstrap-light
+
if [ $changed = 1 ]; then
uci commit luci
fi