mirror of
https://github.com/openwrt/luci.git
synced 2025-01-18 19:32:08 +00:00
fc150636b9
If we build multi-themes into firmware, each of them set itself to be the default theme, what theme should it be? To make it clear, we only set mediaurlbase if the theme is the first time to be installed/built-in. This resolve the issue that theme always change to somewhat default after upgrading the firmware even with a config-keep-upgrade Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
13 lines
243 B
Bash
Executable File
13 lines
243 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if [ "$PKG_UPGRADE" != 1 ]; then
|
|
uci get luci.themes.Material >/dev/null 2>&1 || \
|
|
uci batch <<-EOF
|
|
set luci.themes.Material=/luci-static/material
|
|
set luci.main.mediaurlbase=/luci-static/material
|
|
commit luci
|
|
EOF
|
|
fi
|
|
|
|
exit 0
|