Merge pull request #5430 from jeje42/feature/luci-app-openvpn-add-tls_crypt_v2-option
[project/luci.git] / themes / luci-theme-bootstrap / root / etc / uci-defaults / 30_luci-theme-bootstrap
1 #!/bin/sh
2
3 changed=0
4
5 set_opt() {
6 local key=$1
7 local val=$2
8
9 if ! uci -q get "luci.$key" 2>/dev/null; then
10 uci set "luci.$key=$val"
11 changed=1
12 fi
13 }
14
15 set_opt themes.Bootstrap /luci-static/bootstrap
16
17 if [ "$PKG_UPGRADE" != 1 ] && [ $changed = 1 ]; then
18 set_opt main.mediaurlbase /luci-static/bootstrap
19 fi
20
21 set_opt themes.BootstrapDark /luci-static/bootstrap-dark
22 set_opt themes.BootstrapLight /luci-static/bootstrap-light
23
24 if [ $changed = 1 ]; then
25 uci commit luci
26 fi
27
28 exit 0