#! /bin/bash
#=======================================================================
# NOTE: This one needs more work...
#-----------------------------------------------------------------------
scriptPath="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

javaClassName="sek.ase.auditor.AseAuditor"

##
## List the auditor
##
echo ""
echo " * Listing: sek_ase_auditor"
echo ""

ps -ef | grep "${javaClassName}" | grep -v grep

pidCount=$(ps -ef | grep "${javaClassName}" | grep -v grep | wc -l)
pid=$(ps -ef | grep "${javaClassName}" | grep -v grep | awk '{printf "%s ", $2}')

echo ""
echo " * Found ${pidCount} 'sek_ase_auditor' processes... with PID=${pid}"
echo ""

if [ ${pidCount} -eq 0 ]
then
	exit 1
fi
