From e84f6514538f0638507ce8066f801374db6f4150 Mon Sep 17 00:00:00 2001 From: Glen Huang Date: Sat, 29 Jan 2022 20:54:35 +0800 Subject: acme: use the hotplug system Signed-off-by: Glen Huang --- net/haproxy/Makefile | 2 ++ net/haproxy/files/acme.hotplug | 12 ++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 net/haproxy/files/acme.hotplug (limited to 'net/haproxy') diff --git a/net/haproxy/Makefile b/net/haproxy/Makefile index 3b882d954..bd47c15bb 100644 --- a/net/haproxy/Makefile +++ b/net/haproxy/Makefile @@ -122,6 +122,8 @@ define Package/haproxy/install $(INSTALL_CONF) ./files/haproxy.cfg $(1)/etc/ $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/haproxy.init $(1)/etc/init.d/haproxy + $(INSTALL_DIR) $(1)/etc/hotplug.d/acme + $(INSTALL_DATA) ./files/acme.hotplug $(1)/etc/hotplug.d/acme/00-haproxy endef Package/haproxy-nossl/install = $(Package/haproxy/install) diff --git a/net/haproxy/files/acme.hotplug b/net/haproxy/files/acme.hotplug new file mode 100644 index 000000000..5a4dc5cdd --- /dev/null +++ b/net/haproxy/files/acme.hotplug @@ -0,0 +1,12 @@ +case $ACTION in +issued|renewed) + cat \ + "/etc/ssl/acme/$main_domain.fullchain.cer" \ + "/etc/ssl/acme/$main_domain.key" \ + >"/etc/ssl/acme/$main_domain.combined.cer" + ;; +esac + +if [ "$ACTION" = renewed ]; then + /etc/init.d/haproxy reload +fi -- cgit v1.2.3