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>
This commit is contained in:
parent
6198eb3e64
commit
46fbe55971
3 changed files with 2 additions and 6 deletions
|
@ -8,7 +8,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=uhttpd
|
PKG_NAME:=uhttpd
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=3
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/uhttpd.git
|
PKG_SOURCE_URL=$(PROJECT_GIT)/project/uhttpd.git
|
||||||
|
@ -113,8 +113,6 @@ define Package/uhttpd/install
|
||||||
$(VERSION_SED_SCRIPT) $(1)/etc/config/uhttpd
|
$(VERSION_SED_SCRIPT) $(1)/etc/config/uhttpd
|
||||||
$(INSTALL_DIR) $(1)/usr/sbin
|
$(INSTALL_DIR) $(1)/usr/sbin
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/uhttpd $(1)/usr/sbin/uhttpd
|
$(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
|
endef
|
||||||
|
|
||||||
define Package/uhttpd-mod-lua/install
|
define Package/uhttpd-mod-lua/install
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
if [ "$ACTION" = renewed ]; then
|
|
||||||
/etc/init.d/uhttpd reload
|
|
||||||
fi
|
|
|
@ -222,6 +222,7 @@ start_instance()
|
||||||
service_triggers()
|
service_triggers()
|
||||||
{
|
{
|
||||||
procd_add_reload_trigger "uhttpd"
|
procd_add_reload_trigger "uhttpd"
|
||||||
|
procd_add_raw_trigger acme.renew 5000 /etc/init.d/uhttpd reload
|
||||||
}
|
}
|
||||||
|
|
||||||
start_service() {
|
start_service() {
|
||||||
|
|
Loading…
Reference in a new issue