From 1bd63df263c485c0716acda03979d37f4e9d3943 Mon Sep 17 00:00:00 2001 From: Glen Huang Date: Sun, 16 Oct 2022 12:55:07 +0800 Subject: [PATCH] uhttpd: use acme hotplug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reload uhttpd after certificates are renewed with acme. Reviewed-by: Toke Høiland-Jørgensen Signed-off-by: Glen Huang --- package/network/services/uhttpd/Makefile | 4 +++- package/network/services/uhttpd/files/acme.hotplug | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 package/network/services/uhttpd/files/acme.hotplug diff --git a/package/network/services/uhttpd/Makefile b/package/network/services/uhttpd/Makefile index 36331857fb..3258b70c85 100644 --- a/package/network/services/uhttpd/Makefile +++ b/package/network/services/uhttpd/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uhttpd -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/uhttpd.git @@ -113,6 +113,8 @@ define Package/uhttpd/install $(VERSION_SED_SCRIPT) $(1)/etc/config/uhttpd $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd $(1)/usr/sbin/uhttpd + $(INSTALL_DIR) $(1)/etc/hotplug.d/acme + $(INSTALL_DATA) ./files/acme.hotplug $(1)/etc/hotplug.d/acme/00-uhttpd endef define Package/uhttpd-mod-lua/install diff --git a/package/network/services/uhttpd/files/acme.hotplug b/package/network/services/uhttpd/files/acme.hotplug new file mode 100644 index 0000000000..ace15e09c9 --- /dev/null +++ b/package/network/services/uhttpd/files/acme.hotplug @@ -0,0 +1,3 @@ +if [ "$ACTION" = renewed ]; then + /etc/init.d/uhttpd reload +fi