anchor.diff:  	. /etc/default/locale
   	export LANG
   fi
  -
  -. /lib/lsb/init-functions
  -
  -if [ -r /etc/default/rcS ]; then
  -	. /etc/default/rcS
  -fi
  -
  -
   # The following variables can be overwritten in $ENV_TOMEE
   
   # Run Tomcat 7 as this user ID and group ID
  
positive.code: fi
  
  catalina_sh() {
    $DAEMON_TOMEE $1
  	status="$?"
  	set +a -e
  	return $status
  }
  
  case "$1" in
    start)
  	if [ -z "$JAVA_HOME" ]; then
  		log_failure_msg "no JDK or JRE found - please set JAVA_HOME"
  		exit 1
  	fi
  
  	if [ ! -d "$CATALINA_BASE/conf" ]; then
  		log_failure_msg "invalid CATALINA_BASE: $CATALINA_BASE"
  		exit 1
  	fi
  
  	  log_daemon_msg "Starting $DESC" "$NAME"
     set +e
     catalina_sh start
     set -e
  	;;
    stop)
  	  log_daemon_msg "Stopping $DESC" "$NAME"
  
  	set +e
    catalina_sh stop
  	log_end_msg 0
  	set -e
  	;;
     status)
  
negative.code:     set -e
          ;;
    *)
  	echo "Usage: $0 {start|stop|restart|force-reload|status}"
  	exit 1
  	;;
  esac
  