Skip to content

Instantly share code, notes, and snippets.

@arslanm
arslanm / haproxy-1.6.7-backup_state_file.patch
Last active May 29, 2018 17:31
HAProxy patch against 1.6.7 to control the backup flag of a server using state file, and have the ability to save global server-state-file
# This patch lets you:
# - put server/backend in backup mode, or active mode; "backup" parameter for server isn't needed in the configuration file.
# - save global server state to 'server-state-file' (absolute path required)
# see the UI here: http://i.imgur.com/n2O5V6P.png
# Instructions
$ wget http://www.haproxy.org/download/1.6/src/haproxy-1.6.7.tar.gz
$ tar xf haproxy-1.6.7.tar.gz
$ cd haproxy-1.6.7
@arslanm
arslanm / gist:9d0b93c414b7645e9a74731ed37b91c0
Last active October 24, 2017 13:25
HAProxy patch against 1.6.6 to control the backup flag of a server using state file
$ wget http://www.haproxy.org/download/1.6/src/haproxy-1.6.6.tar.gz
$ tar xf haproxy-1.6.6.tar.gz
$ cd haproxy-1.6.6
$ cat below_patch | patch -p1
$ make USE_PCRE=1 DEBUG="" ARCH=$(uname -m) TARGET=linux26
$ make install
/etc/haproxy/haproxy.cfg:
global
...