30_luci-theme-bootstrap 483 B

12345678910111213141516171819202122232425262728
  1. #!/bin/sh
  2. changed=0
  3. set_opt() {
  4. local key=$1
  5. local val=$2
  6. if ! uci -q get "luci.$key" 2>/dev/null; then
  7. uci set "luci.$key=$val"
  8. changed=1
  9. fi
  10. }
  11. set_opt themes.Bootstrap /luci-static/bootstrap
  12. if [ "$PKG_UPGRADE" != 1 ] && [ $changed = 1 ]; then
  13. set_opt main.mediaurlbase /luci-static/bootstrap
  14. fi
  15. set_opt themes.BootstrapDark /luci-static/bootstrap-dark
  16. set_opt themes.BootstrapLight /luci-static/bootstrap-light
  17. if [ $changed = 1 ]; then
  18. uci commit luci
  19. fi
  20. exit 0