mirror of
https://github.com/novatiq/packages.git
synced 2026-04-29 23:18:42 +01:00
haproxy: Update HAProxy to v2.0.0 (LTS)
- Update haproxy download URL and hash - Add new patches - Add several CFLAGS (derived from haproxy Makefile) to make the build work with v1.9+ - Update default configuration - Add check-command (for config) to init-script - Add prometheus-service from contribs by default - Add support for uclibc to haproxy with libcrypt disabled - Minor cleanups I have been running v2.0 for some time now and it feels as stable as v1.8. v2.0 is the new LTS release. Signed-off-by: Christian Lachner <gladiac@gmail.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Example configuration file for HAProxy 1.3, refer to the url below for
|
||||
# Example configuration file for HAProxy 2.0, refer to the url below for
|
||||
# a full documentation and examples for configuration:
|
||||
# http://haproxy.1wt.eu/download/1.3/doc/configuration.txt
|
||||
# https://cbonte.github.io/haproxy-dconv/2.0/configuration.html
|
||||
|
||||
|
||||
# Global parameters
|
||||
@@ -38,6 +38,13 @@ global
|
||||
# limits like number of open file descriptors. Default is 1.
|
||||
#nbproc 2
|
||||
|
||||
# Default parameters
|
||||
defaults
|
||||
# Default timeouts
|
||||
timeout connect 5000ms
|
||||
timeout client 50000ms
|
||||
timeout server 50000ms
|
||||
|
||||
|
||||
# Example HTTP proxy listener
|
||||
listen my_http_proxy
|
||||
@@ -78,9 +85,9 @@ listen my_smtp_proxy
|
||||
# Round robin load balancing over two servers on port 123 forcing
|
||||
# the address 192.168.1.1 and port 25 as source.
|
||||
balance roundrobin
|
||||
#use next line for transparent proxy, so the servers can see the
|
||||
#original ip-address and remove source keyword in server definition
|
||||
#source 0.0.0.0 usesrc clientip
|
||||
#use next line for transparent proxy, so the servers can see the
|
||||
#original ip-address and remove source keyword in server definition
|
||||
#source 0.0.0.0 usesrc clientip
|
||||
server server01 192.168.1.10:123 source 192.168.1.1:25
|
||||
server server02 192.168.1.20:123 source 192.168.1.1:25
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "$ACTION" = add ]; then
|
||||
|
||||
/etc/init.d/haproxy enabled && \
|
||||
/etc/init.d/haproxy start
|
||||
fi
|
||||
|
||||
@@ -5,6 +5,7 @@ START=99
|
||||
STOP=80
|
||||
|
||||
SERVICE_USE_PID=1
|
||||
EXTRA_COMMANDS="check"
|
||||
|
||||
HAPROXY_BIN="/usr/sbin/haproxy"
|
||||
HAPROXY_CONFIG="/etc/haproxy.cfg"
|
||||
@@ -20,6 +21,9 @@ stop() {
|
||||
}
|
||||
|
||||
reload() {
|
||||
$HAPROXY_BIN -D -q -f $HAPROXY_CONFIG -p $HAPROXY_PID -sf $(cat $HAPROXY_PID | tr "\n" " ")
|
||||
#$HAPROXY_BIN -D -q -f $HAPROXY_CONFIG -p $HAPROXY_PID -sf $(cat $HAPROXY_PID)
|
||||
$HAPROXY_BIN -D -q -f $HAPROXY_CONFIG -p $HAPROXY_PID -sf $(cat $HAPROXY_PID)
|
||||
}
|
||||
|
||||
check() {
|
||||
$HAPROXY_BIN -c -q -V -f $HAPROXY_CONFIG
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user