#!/bin/sh

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

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

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

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

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

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