Skip to content

Instantly share code, notes, and snippets.

View nharasym's full-sized avatar

Nick Harasym nharasym

View GitHub Profile
@nharasym
nharasym / haconfig.sh
Last active December 25, 2015 04:03 — forked from jlazic/haconfig.sh
Split monolithic HAProxy configuration
#!/bin/bash
#Requirements: etckeeper, diffcolor
#This script concatenates multiple files of haproxy configuration into
#one file, and than checks if monolithic config contains errors. If everything is
#OK with new config script will write new config to $CURRENTCFG and reload haproxy
#Also, script will commit changes to etckeeper, if you don't use etckeeper you
#should start using it.
#Script assumes following directory structure:
#/etc/haproxy/conf.d/