aboutsummaryrefslogtreecommitdiffstats
path: root/package/network
diff options
context:
space:
mode:
authorGlen Huang <i@glenhuang.com>2022-10-24 23:39:55 +0800
committerJo-Philipp Wich <jo@mein.io>2022-11-04 16:21:00 +0100
commit46fbe55971c0e42bc1603bca424f3ff5384f15a6 (patch)
tree710984f01fb6d4625620da2bc7a4d96a5cefe684 /package/network
parent6198eb3e6448e9a43a32d3f46b7d0543424f455b (diff)
downloadupstream-46fbe55971c0e42bc1603bca424f3ff5384f15a6.tar.gz
upstream-46fbe55971c0e42bc1603bca424f3ff5384f15a6.tar.bz2
upstream-46fbe55971c0e42bc1603bca424f3ff5384f15a6.zip
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@glenhuang.com>
Diffstat (limited to 'package/network')
-rw-r--r--package/network/services/uhttpd/Makefile4
-rw-r--r--package/network/services/uhttpd/files/acme.hotplug3
-rwxr-xr-xpackage/network/services/uhttpd/files/uhttpd.init1
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() {