Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #933 from kmcgrath/master
Browse files Browse the repository at this point in the history
AWS Linux aware haproxy-marathon-bridge
  • Loading branch information
lloesche committed Jan 12, 2015
2 parents a714f5d + a53a435 commit 45a9bba
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions bin/haproxy-marathon-bridge
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,16 @@ function refresh_system_haproxy {
}

function install_haproxy_system {
os=$(lsb_release -si)
if [[ $os == "CentOS" ]] || [[ $os == "RHEL" ]]

if hash lsb_release 2>/dev/null
then
os=$(lsb_release -si)
elif [ -e "/etc/system-release" ] && (grep -q "Amazon Linux AMI" "/etc/system-release")
then
os="AmazonAMI"
fi

if [[ $os == "CentOS" ]] || [[ $os == "RHEL" ]] || [[ $os == "AmazonAMI" ]]
then
sudo yum install -y haproxy
sudo chkconfig haproxy on
Expand Down

0 comments on commit 45a9bba

Please sign in to comment.