luci-theme-*: set mediaurlbase if it is the first time to be installed
[oweals/luci.git] / themes / luci-theme-openwrt-2020 / root / etc / uci-defaults / 30_luci-theme-openwrt-2020
1 #!/bin/sh
2
3 if [ "$PKG_UPGRADE" != 1 ]; then
4         uci get luci.themes.OpenWrt2020 >/dev/null 2>&1 || \
5         uci batch <<-EOF
6                 set luci.themes.OpenWrt2020=/luci-static/openwrt2020
7                 set luci.main.mediaurlbase=/luci-static/openwrt2020
8                 commit luci
9         EOF
10 fi
11
12 exit 0