#!/bin/sh

# set global env setting
. /opt/jilroy/checkit//bin/env

# copy libraries to tomcat lib 
# important in multiple installations handle
cp $INSTALLDIR/lib/* /opt/jilroy/tomcat/lib

sleep 3

# init database
$INSTALLDIR/bin/dbconf

# create inventory db
$INSTALLDIR/bin/inventory

# start tomcat
sudo $INSTALLDIR/bin/runtomcat.sh

$INSTALLDIR/bin/runscheduler.sh  &

$INSTALLDIR/bin/watchdog.sh  &

echo "-----------------------"
echo "installation completed."
echo "-----------------------"
