#!/bin/sh

######################################################
# SERVICE ENABLE
######################################################
if [ ! -f "/etc/init.d/exem-manager-agent" ]; then
  cp __INST__EXEM_HOME__/manager/service/exem-manager-agent_sun /etc/init.d/exem-manager-agent

  ln -s /etc/init.d/exem-manager-agent /etc/rc2.d/S999exem-manager-agent
  ln -s /etc/init.d/exem-manager-agent /etc/rc2.d/K999exem-manager-agent

  chmod 755 /etc/init.d/exem-manager-agent
  chmod 755 /etc/rc2.d/S999exem-manager-agent
  chmod 755 /etc/rc2.d/K999exem-manager-agent
fi

echo "exem-manager-agent is enabled [service_start.sh]"


######################################################
# SERVICE START
######################################################
/etc/init.d/exem-manager-agent start

echo "exem-manager-agent is started [service_start.sh]"
