#!/bin/bash

if [ -f $HOME/.bash_profile ]; then
  . $HOME/.bash_profile
fi

cd $EMGDIR
if [ -f block_emgd ]; then
  exit 0
fi

# We can have some configuration parameters in environment variables.
if [ -f emgd.env ]; then
	. ./emgd.env
	export $(compgen -v|grep EMG_)
fi

ulimit -c unlimited
fname=fg.log
exec emgd -fg > $fname 2>&1

