You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

24 lines
495 B

#!/bin/sh /etc/rc.common
# Copyright (C) 2009-2019 OpenWrt.org
START=99
STOP=80
USE_PROCD=1
HAPROXY_BIN="/usr/sbin/haproxy"
HAPROXY_CONFIG="/etc/haproxy.cfg"
start_service() {
procd_open_instance
procd_set_param respawn
procd_set_param file "$HAPROXY_CONFIG"
procd_set_param reload_signal USR2
procd_set_param command $HAPROXY_BIN -q -W -db -f "$HAPROXY_CONFIG"
procd_close_instance
}
extra_command "check" "Check haproxy config"
check() {
$HAPROXY_BIN -c -q -V -f $HAPROXY_CONFIG
}