From: Christian Lachner Date: Fri, 16 Jan 2026 06:49:04 +0000 (+0100) Subject: haproxy: implement force_reload init option X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=df9b7923dbc8ed1766848550ff0313a223b90e85;p=openwrt-packages.git haproxy: implement force_reload init option - It will be used for acme-renew events - Fixes issue #28038 Signed-off-by: Christian Lachner --- diff --git a/net/haproxy/files/haproxy.init b/net/haproxy/files/haproxy.init index 51c0ebb65..8007bfb4f 100644 --- a/net/haproxy/files/haproxy.init +++ b/net/haproxy/files/haproxy.init @@ -1,5 +1,5 @@ #!/bin/sh /etc/rc.common -# Copyright (C) 2009-2019 OpenWrt.org +# Copyright (C) 2009-2026 OpenWrt.org START=99 STOP=80 @@ -18,11 +18,16 @@ start_service() { procd_close_instance } -service_triggers() { - procd_add_raw_trigger acme.renew 5000 /etc/init.d/haproxy reload +extra_command "force_reload" "Forcibly reload configuration files" +force_reload() { + procd_send_signal haproxy '*' USR2 } extra_command "check" "Check haproxy config" check() { $HAPROXY_BIN -c -q -V -f $HAPROXY_CONFIG } + +service_triggers() { + procd_add_raw_trigger acme.renew 5000 /etc/init.d/haproxy force_reload +}