mirror of
https://github.com/openwrt/packages.git
synced 2026-02-04 12:06:29 +08:00
haproxy: implement force_reload init option
- It will be used for acme-renew events - Fixes issue #28038 Signed-off-by: Christian Lachner <gladiac@gmail.com>
This commit is contained in:
committed by
Hannu Nyman
parent
88e75f45ab
commit
df9b7923db
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user