#!/bin/bash

# Startup script for exemONE exem-host-agent
# chkconfig: 345 50 50
# description: exemONE exem-host-agent
# processname: exem-host-agent
# directory : EXEM_HOST_HOME={{ EXEM_HOME }}

source /etc/profile

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