#!/bin/sh
#
# Copyright (c) 2001, PerfCap Corporation, Nashua NH
# All Rights Reserved
#
# Sun Data Collector Post Installation Script
#
# History:
#   29 sep 2005	  paul	   use PERFCAP_ROOT + use flag for
#			   link to system folders.
#-----------------------------------------------------

PERFCAP_OWN="root:sys"

#this shouldnt be needed, as now in package

if [ ! -f /etc/init.d/perfcap ]
then
       cp -f $PERFCAP_ROOT/init.d/perfcap  /etc/init.d/perfcap
       chown $PERFCAP_OWN /etc/init.d/perfcap
       ln -sf  /etc/init.d/perfcap /etc/rc3.d/S90perfcap
       ln -sf  /etc/init.d/perfcap /etc/rc0.d/K90perfcap
       chmod 744  /etc/init.d/perfcap
fi

# startup

$PERFCAP_ROOT/bin/ecap_monitor > /dev/null 2>&1

#  echo "version" > $PERFCAP_ROOT/settings/.install_dc

 echo "+--------------------------------------------------------------------+"
 echo " eCAP Monitor installed, access it with $PERFCAP_ROOT/bin/ecap_monitor"
 echo "+--------------------------------------------------------------------+"
 exit 0

