#!/bin/sh
# IBM_PROLOG_BEGIN_TAG 
# This is an automatically generated prolog. 
#  
# bos720 src/bos/usr/lpp/bosinst/samples/AE/AE/ServiceTemplate.sh 1.2 
#  
# Licensed Materials - Property of IBM 
#  
# COPYRIGHT International Business Machines Corp. 2008,2009 
# All Rights Reserved 
#  
# US Government Users Restricted Rights - Use, duplication or 
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp. 
#  
# IBM_PROLOG_END_TAG 

# @(#)28        1.2  src/bos/usr/lpp/bosinst/samples/AE/AE/ServiceTemplate.sh, bosinst, bos720 3/31/09 15:21:07

#
# A template for creating activation services. String replacement is used to customize each instance
# of this template. The values are filled in by the AE using the activation logic file (*.al).
#
# chkconfig:
# description: AE Service Series
#


### BEGIN INIT INFO
# Provides:
# Required-Start:
# Should-Start:
# Required-Stop:
# Default-Start:
# Default-Stop:
# Description:    AE Service Series
### END INIT INFO

ECHOE="echo -e"
UNAME=`uname -s`;
if [ "$UNAME" = "AIX" ]
then
  ECHOE="echo"
fi

AE_BIN=
test -f $AE_BIN || exit -1

if [ -f /etc/rc.status ]; then
  . /etc/rc.status
  rc_reset
fi

case "$1" in
    start)
        $ECHOE "Starting AE service: $SERVNAME"
        # Remember status and be verbose
        sh $AE_BIN -s 
        test -f /etc/rc.status && rc_status -v
        ;;
    stop)
        $ECHOE "Shutting down AE service: $SERVNAME"
        test -f /etc/rc.status && rc_status -v
        ;;
    status)
        $ECHOE "Checking AE service: $SERVNAME"
        test -f /etc/rc.status && rc_status -v
        ;;
    *)
        #if no parameters are given, print which are avaiable.
        echo "Usage: $0 {start|stop|status|restart|reload}"
        exit 1
        ;;
esac

exit 0
