check_if_ec2() { if [ -f /sys/hypervisor/uuid ] && [ `head -c 3 /sys/hypervisor/uuid` = 'ec2' ]; then return 0 else return 1 fi } get_ec2_address() { url=$1 # Try collecting fqdn if it is set correctly fqdn=$(/opt/gitlab/embedded/bin/curl -s ${url}) if [ -n "${fqdn}" ]; then # Checking if curl returned an XML message word="