- cp -v ../../.env.example ./.env
- sed -i 's/KONG_DOMAIN=<string>/KONG_DOMAIN=kong/' .env
- sed -i 's/KONG_PROTOCOL=<http or https protocol scheme>/KONG_PROTOCOL=http/' .env
- sed -i 's/KONG_IPV4=<host string>/KONG_IPV4=10.101.1.101/' .env
- sed -i 's/KONG_DATA_PLANE_PORT=<port number>/KONG_DATA_PLANE_PORT=32080/' .env
- sed -i 's/KONG_CONTROL_PLANE_PORT=<port number>/KONG_CONTROL_PLANE_PORT=32081/' .env
- sed -i 's/CAPIF_PROTOCOL=<http or https protocol scheme>/CAPIF_PROTOCOL=http/' .env
- sed -i 's/CAPIF_IPV4=<host>/CAPIF_IPV4=10.101.1.101/' .env
- sed -i 's/CAPIF_PORT=<port number>/CAPIF_PORT=31570/' .env
- sed -i 's/LOG_LEVEL=<Trace, Debug, Info, Warning, Error, Fatal or Panic>/LOG_LEVEL=Info/' .env
- sed -i 's/SERVICE_MANAGER_PORT=<port number>/SERVICE_MANAGER_PORT=8095/' .env
- sed -i 's/TEST_SERVICE_IPV4=<host string>/TEST_SERVICE_IPV4=10.101.1.101/' .env
- sed -i 's/TEST_SERVICE_PORT=<port number>/TEST_SERVICE_PORT=30951/' .env
+ if [ ! -f ../../.env ]; then
+ cp -v ../../.env.example ../../.env
+ sed -i 's/KONG_DOMAIN=<string>/KONG_DOMAIN=kong/' ../../.env
+ sed -i 's/KONG_PROTOCOL=<http or https protocol scheme>/KONG_PROTOCOL=http/' ../../.env
+ sed -i 's/KONG_IPV4=<host string>/KONG_IPV4=10.101.1.101/' ../../.env
+ sed -i 's/KONG_DATA_PLANE_PORT=<port number>/KONG_DATA_PLANE_PORT=32080/' ../../.env
+ sed -i 's/KONG_CONTROL_PLANE_PORT=<port number>/KONG_CONTROL_PLANE_PORT=32081/' ../../.env
+ sed -i 's/CAPIF_PROTOCOL=<http or https protocol scheme>/CAPIF_PROTOCOL=http/' ../../.env
+ sed -i 's/CAPIF_IPV4=<host>/CAPIF_IPV4=10.101.1.101/' ../../.env
+ sed -i 's/CAPIF_PORT=<port number>/CAPIF_PORT=31570/' ../../.env
+ sed -i 's/LOG_LEVEL=<Trace, Debug, Info, Warning, Error, Fatal or Panic>/LOG_LEVEL=Info/' ../../.env
+ sed -i 's/SERVICE_MANAGER_PORT=<port number>/SERVICE_MANAGER_PORT=8095/' ../../.env
+ sed -i 's/TEST_SERVICE_IPV4=<host string>/TEST_SERVICE_IPV4=10.101.1.101/' ../../.env
+ sed -i 's/TEST_SERVICE_PORT=<port number>/TEST_SERVICE_PORT=30951/' ../../.env
+ echo "created .env"
+ else
+ echo "found .env"
+ fi