
EC2_DIR=/usr/lib/AmazonEC2

export EC2_URL="http://ec2.amazonaws.com"
export EC2_HOME=$EC2_DIR/ec2-api-tools
export EC2_AMITOOL_HOME=$EC2_DIR/ec2-ami-tools
export PATH=$PATH:$EC2_HOME/bin:$EC2_AMITOOL_HOME/bin
export JAVA_HOME=/usr

export EC2_PRIVATE_KEY=$HOME/.ec2/pk-aws.pem
export EC2_CERT=$HOME/.ec2/cert-aws.pem

# Check for proxy settings
. /etc/sysconfig/proxy
if [ "$PROXY_ENABLED" == "yes" ]; then
  HTTPS_PROXY="http://proxy.provider.de:3128/"
  host="${HTTPS_PROXY#*://}"
  port="${host##*\:}"
  port="${port%\/}"
  host="${host%%\:*}"

  export EC2_JVM_ARGS="-Dhttps.proxyHost=$host -Dhttps.proxyPort=$port"
fi

