#!/bin/bash

# chkconfig:   2345 80 30
# description: testing Adeptia service. This is the last attempt else will crash this system.

### BEGIN INIT INFO
# Provides: adeptia
# Required-Start: $local_fs $network $remote_fs
# Required-Stop: $local_fs $network $remote_fs
# Default-Start: 2345
# Default-Stop: 016
# Short-Description: start and stop adeptia build
# Description:   adeptia
### END INIT INFO

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

RETVAL=$?
INSTALLATIONPATH=/usr/local/bin/AdeptiaSuiteTest/AdeptiaServer-5.2/ServerKernel

case "$1" in

start)
	if [ -f $INSTALLATIONPATH/startup.sh ];
		then
		cd $INSTALLATIONPATH
		echo $"Starting Kernel and WebRunner"
		date
		./startup.sh
	fi
	;;
stop)
	if [ -f $INSTALLATIONPATH/stop.sh ];
		then
		cd $INSTALLATIONPATH
		echo $"Stopping Kernel and WebRunner"
		date
		./stop.sh
	fi
	;;
*)
	echo $"Usage': $0 {start|stop}"
	exit 1
	;;
	esac

exit #RETVAL

