#!/bin/bash

# Startup script for exemONE exem-manager-agent
# chkconfig: 345 50 50
# description: exemONE exem-manager-agent
# processname: exem-manager-agent
# directory : MGR_EXEM_MANAGER_HOME={{ EXEM_HOME }}/manager

source /etc/profile

case "$1" in
    start)
        echo "Starting exem-manager-agent: "
        {{ EXEM_HOME }}/manager/script/binary_start.sh
        ;;
    stop)
        echo "Shutting down exem-manager-agent: "
        {{ EXEM_HOME }}/manager/script/binary_stop.sh
        ;;
    restart)
        echo "Restarting exem-manager-agent: "
        {{ EXEM_HOME }}/manager/script/binary_stop.sh
        {{ EXEM_HOME }}/manager/script/binary_start.sh
        ;;
    *)
        echo "Usage: service exem-manager-agent { start | stop | restart }"
        exit 1
esac
exit 0