2012-02-15 18:08:44 +00:00
|
|
|
#!/bin/sh
|
2019-06-03 14:49:10 +00:00
|
|
|
|
2021-11-07 10:04:52 +00:00
|
|
|
changed=0
|
|
|
|
|
|
|
|
set_opt() {
|
|
|
|
local key=$1
|
|
|
|
local val=$2
|
|
|
|
|
2021-11-16 12:11:45 +00:00
|
|
|
if ! uci -q get "luci.$key" 2>/dev/null; then
|
|
|
|
uci set "luci.$key=$val"
|
2021-11-07 10:04:52 +00:00
|
|
|
changed=1
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2021-11-16 12:11:45 +00:00
|
|
|
set_opt themes.Bootstrap /luci-static/bootstrap
|
2021-11-07 10:04:52 +00:00
|
|
|
|
2021-11-16 12:11:45 +00:00
|
|
|
if [ "$PKG_UPGRADE" != 1 ] && [ $changed = 1 ]; then
|
|
|
|
set_opt main.mediaurlbase /luci-static/bootstrap
|
2021-11-07 10:04:52 +00:00
|
|
|
fi
|
|
|
|
|
2021-11-16 12:11:45 +00:00
|
|
|
set_opt themes.BootstrapDark /luci-static/bootstrap-dark
|
|
|
|
set_opt themes.BootstrapLight /luci-static/bootstrap-light
|
|
|
|
|
2021-11-07 10:04:52 +00:00
|
|
|
if [ $changed = 1 ]; then
|
|
|
|
uci commit luci
|
2019-06-03 14:49:10 +00:00
|
|
|
fi
|
|
|
|
|
2012-02-15 18:08:44 +00:00
|
|
|
exit 0
|