From 21b40652d9b40210075ae1b00a548520a211c862 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Tue, 12 Apr 2022 13:38:15 +0200 Subject: [PATCH] luci-theme-: add postrm script Remove uci theme config section on uninstall. Signed-off-by: Florian Eckert --- themes/luci-theme-bootstrap/Makefile | 10 ++++++++++ themes/luci-theme-material/Makefile | 8 ++++++++ themes/luci-theme-openwrt-2020/Makefile | 8 ++++++++ themes/luci-theme-openwrt/Makefile | 8 ++++++++ 4 files changed, 34 insertions(+) diff --git a/themes/luci-theme-bootstrap/Makefile b/themes/luci-theme-bootstrap/Makefile index 1bb205ee05..1e7f49a12e 100644 --- a/themes/luci-theme-bootstrap/Makefile +++ b/themes/luci-theme-bootstrap/Makefile @@ -11,6 +11,16 @@ LUCI_DEPENDS:= PKG_LICENSE:=Apache-2.0 +define Package/luci-theme-bootstrap/postrm +#!/bin/sh +[ -n "$${IPKG_INSTROOT}" ] || { + uci -q delete luci.themes.Bootstrap + uci -q delete luci.themes.BootstrapDark + uci -q delete luci.themes.BootstrapLight + uci commit luci +} +endef + include ../../luci.mk # call BuildPackage - OpenWrt buildroot signature diff --git a/themes/luci-theme-material/Makefile b/themes/luci-theme-material/Makefile index 5bc16eb7db..0fdd55edd4 100644 --- a/themes/luci-theme-material/Makefile +++ b/themes/luci-theme-material/Makefile @@ -9,6 +9,14 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=Material Theme LUCI_DEPENDS:= +define Package/luci-theme-material/postrm +#!/bin/sh +[ -n "$${IPKG_INSTROOT}" ] || { + uci -q delete luci.themes.Material + uci commit luci +} +endef + include ../../luci.mk # call BuildPackage - OpenWrt buildroot signature diff --git a/themes/luci-theme-openwrt-2020/Makefile b/themes/luci-theme-openwrt-2020/Makefile index dcbe110125..8b0c1a93a5 100644 --- a/themes/luci-theme-openwrt-2020/Makefile +++ b/themes/luci-theme-openwrt-2020/Makefile @@ -9,6 +9,14 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=LuCI modern OpenWrt theme LUCI_DEPENDS:= +define Package/luci-theme-openwrt-2020/postrm +#!/bin/sh +[ -n "$${IPKG_INSTROOT}" ] || { + uci -q delete luci.themes.OpenWrt2020 + uci commit luci +} +endef + include ../../luci.mk # call BuildPackage - OpenWrt buildroot signature diff --git a/themes/luci-theme-openwrt/Makefile b/themes/luci-theme-openwrt/Makefile index b873d80727..41f479157c 100644 --- a/themes/luci-theme-openwrt/Makefile +++ b/themes/luci-theme-openwrt/Makefile @@ -9,6 +9,14 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=LuCI OpenWrt.org theme LUCI_DEPENDS:= +define Package/luci-theme-openwrt/postrm +#!/bin/sh +[ -n "$${IPKG_INSTROOT}" ] || { + uci -q delete luci.themes.OpenWrt + uci commit luci +} +endef + include ../../luci.mk # call BuildPackage - OpenWrt buildroot signature -- 2.30.2