[openwrt/openwrt] uhttpd: use procd to reload on acme renew
LEDE Commits
lede-commits at lists.infradead.org
Fri Nov 4 08:21:10 PDT 2022
jow pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/46fbe55971c0e42bc1603bca424f3ff5384f15a6
commit 46fbe55971c0e42bc1603bca424f3ff5384f15a6
Author: Glen Huang <i at glenhuang.com>
AuthorDate: Mon Oct 24 23:39:55 2022 +0800
uhttpd: use procd to reload on acme renew
Calling /etc/init.d/uhttpd reload directly in the acme hotplug script
can inadvertently start a stopped instance.
Signed-off-by: Glen Huang <i at glenhuang.com>
---
package/network/services/uhttpd/Makefile | 4 +---
package/network/services/uhttpd/files/acme.hotplug | 3 ---
package/network/services/uhttpd/files/uhttpd.init | 1 +
3 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/package/network/services/uhttpd/Makefile b/package/network/services/uhttpd/Makefile
index 3258b70c85..d6a5a27181 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:=2
+PKG_RELEASE:=3
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/uhttpd.git
@@ -113,8 +113,6 @@ 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
deleted file mode 100644
index ace15e09c9..0000000000
--- a/package/network/services/uhttpd/files/acme.hotplug
+++ /dev/null
@@ -1,3 +0,0 @@
-if [ "$ACTION" = renewed ]; then
- /etc/init.d/uhttpd reload
-fi
diff --git a/package/network/services/uhttpd/files/uhttpd.init b/package/network/services/uhttpd/files/uhttpd.init
index 8dbc23f59c..bfde231bf6 100755
--- a/package/network/services/uhttpd/files/uhttpd.init
+++ b/package/network/services/uhttpd/files/uhttpd.init
@@ -222,6 +222,7 @@ start_instance()
service_triggers()
{
procd_add_reload_trigger "uhttpd"
+ procd_add_raw_trigger acme.renew 5000 /etc/init.d/uhttpd reload
}
start_service() {
More information about the lede-commits
mailing list