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.

23 lines
420 B

  1. #!/bin/sh /etc/rc.common
  2. # Copyright (C) 2009-2010 OpenWrt.org
  3. START=99
  4. STOP=80
  5. SERVICE_USE_PID=1
  6. HAPROXY_BIN="/usr/sbin/haproxy"
  7. HAPROXY_CONFIG="/etc/haproxy.cfg"
  8. HAPROXY_PID="/var/run/haproxy.pid"
  9. start() {
  10. service_start $HAPROXY_BIN -q -D -f "$HAPROXY_CONFIG" -p "$HAPROXY_PID"
  11. }
  12. stop() {
  13. service_stop $HAPROXY_BIN
  14. }
  15. reload() {
  16. $HAPROXY_BIN -D -q -f $HAPROXY_CONFIG -p $HAPROXY_PID -sf $(cat $HAPROXY_PID)
  17. }