Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (22 sloc) 885 Bytes
#A hot reconfiguration script would look like this :
#Extract from
# save previous state
mv /etc/haproxy/config /etc/haproxy/config.old
mv /var/run/ /var/run/
mv /etc/haproxy/ /etc/haproxy/config
kill -TTOU $(cat /var/run/
if haproxy -p /var/run/ -f /etc/haproxy/config; then
echo "New instance successfully loaded, stopping previous one."
kill -USR1 $(cat /var/run/
rm -f /var/run/
exit 1
echo "New instance failed to start, resuming previous one."
kill -TTIN $(cat /var/run/
rm -f /var/run/
mv /var/run/ /var/run/
mv /etc/haproxy/config /etc/haproxy/
mv /etc/haproxy/config.old /etc/haproxy/config
exit 0