#!/bin/bash
ACTIVE="$1"
if [ -z "$ACTIVE" ]; then
  ACTIVE="test"
  echo "Use default profile: $ACTIVE"
fi
nohup ./catalina.sh adx-service -Heap 512m -Dspring.profiles.active=$ACTIVE 2&> /dev/null &

sleep 2
basepath=$(cd `dirname $0`; pwd)
dirname $0
cd `dirname $0`
tail ../logs/adx-service.log -f