Skip to content

Instantly share code, notes, and snippets.

@x-cray
Last active December 2, 2015 15:13
Show Gist options
  • Save x-cray/1fca220a35fecce7b6a7 to your computer and use it in GitHub Desktop.
Save x-cray/1fca220a35fecce7b6a7 to your computer and use it in GitHub Desktop.
Gracefully reloads HAProxy configuration on Linux
#!/bin/bash
iptables -I INPUT -p tcp --dport 80 --syn -j DROP
sleep 0.2
systemctl reload haproxy
iptables -D INPUT -p tcp --dport 80 --syn -j DROP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment