acme: use the hotplug system

Signed-off-by: Glen Huang <heyhgl@gmail.com>
This commit is contained in:
Glen Huang
2022-01-29 20:54:35 +08:00
committed by Toke Høiland-Jørgensen
parent b02fea131b
commit e84f651453
15 changed files with 450 additions and 487 deletions

View File

@@ -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)

View File

@@ -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