#!/bin/bash
#==============================================================================
#  Company:
#      Equinox Payments, LLC
#
#  Product:
#      Platform
#      Copyright 2020 Equinox Payments, LLC
#
#  \brief
#      Return primary IP address
#
#==============================================================================
ip=`ip route get 1 | awk '{print $NF;exit}' | tr -d '\n'`

echo -e "Content-type: application/json\r\n"
echo "{"
echo "    \"ip\": \"$ip\""
echo "}"
