mirror of
https://github.com/openwrt/packages.git
synced 2025-12-21 19:14:30 +04:00
acme: use the hotplug system
Signed-off-by: Glen Huang <heyhgl@gmail.com>
This commit is contained in:
committed by
Toke Høiland-Jørgensen
parent
b02fea131b
commit
e84f651453
@@ -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)
|
||||
|
||||
12
net/haproxy/files/acme.hotplug
Normal file
12
net/haproxy/files/acme.hotplug
Normal 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
|
||||
Reference in New Issue
Block a user