From: Glen Huang Date: Sun, 16 Oct 2022 04:55:07 +0000 (+0800) Subject: uhttpd: use acme hotplug X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=1bd63df263c485c0716acda03979d37f4e9d3943;p=openwrt%2Fstaging%2Fblocktrron.git uhttpd: use acme hotplug Reload uhttpd after certificates are renewed with acme. Reviewed-by: Toke Høiland-Jørgensen Signed-off-by: Glen Huang --- 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