luci-theme-: add postrm script 6191/head
authorFlorian Eckert <fe@dev.tdt.de>
Tue, 12 Apr 2022 11:38:15 +0000 (13:38 +0200)
committerFlorian Eckert <fe@dev.tdt.de>
Mon, 9 Jan 2023 12:07:42 +0000 (13:07 +0100)
Remove uci theme config section on uninstall.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
themes/luci-theme-bootstrap/Makefile
themes/luci-theme-material/Makefile
themes/luci-theme-openwrt-2020/Makefile
themes/luci-theme-openwrt/Makefile

index 1bb205ee053a3318abf8bd8953c68f1d4cd40287..1e7f49a12ea538fd12b42f7dcc4dafed277d3a0c 100644 (file)
@@ -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
index 5bc16eb7db7c609893ec9e1c18db05795b15e9be..0fdd55edd4486876cecf47564b27bcbd9ed0830f 100644 (file)
@@ -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
index dcbe110125f04bfcefc69c9038573458b6024170..8b0c1a93a5cdf6f58391b1480189b0ebe8bb4122 100644 (file)
@@ -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
index b873d80727d4bee961fbeee33bb42d557a2ce13e..41f479157c18e074c837cefc5e41b09ca06c840c 100644 (file)
@@ -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