#!/usr/bin/env bash

BASE_DIR="$(cd "$(dirname "$0")"; pwd)";

export CONTAINER_IP=`cat /etc/hosts | egrep -v "ip6-|local|Kubernetes-managed" | awk '{print $1}'`
export CONTAINER_NAME=`cat /etc/hosts | egrep -v "ip6-|local|Kubernetes-managed" | awk '{print $2}'`

#java -DCONTAINER_NAME=${CONTAINER_NAME} -DSCOUTER_IP=${CONTAINER_IP} -Xmx512m -classpath ${BASE_DIR}/scouter-server-boot.jar scouter.boot.Boot ./lib

java -Xms2048m -Xmx2048m -XX:MaxMetaspaceSize=512m -XX:MetaspaceSize=256m -XX:+UseG1GC -classpath ${BASE_DIR}/scouter-server-boot.jar scouter.boot.Boot ./lib
