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.

25 lines
474 B

  1. #!/bin/sh /etc/rc.common
  2. # Copyright (C) 2009-2019 OpenWrt.org
  3. START=99
  4. STOP=80
  5. USE_PROCD=1
  6. EXTRA_COMMANDS="check"
  7. HAPROXY_BIN="/usr/sbin/haproxy"
  8. HAPROXY_CONFIG="/etc/haproxy.cfg"
  9. start_service() {
  10. procd_open_instance
  11. procd_set_param respawn
  12. procd_set_param file "$HAPROXY_CONFIG"
  13. procd_set_param reload_signal USR2
  14. procd_set_param command $HAPROXY_BIN -q -W -db -f "$HAPROXY_CONFIG"
  15. procd_close_instance
  16. }
  17. check() {
  18. $HAPROXY_BIN -c -q -V -f $HAPROXY_CONFIG
  19. }