#!/bin/bash

# Copyright (C) 2011 NTT DATA Corporation
#
# This program is free software; you can redistribute it and/or
# Modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details

SCRIPT_DIR=$(cd $(dirname $0);pwd)
. ${SCRIPT_DIR}/../conf/hinemos_agent.cfg
export PROG=`basename $0`

${HINEMOS_AGENT_HOME}/bin/agent_stop.sh

if [ "x"$1 = "xcopy" ]; then
        mv -f ${HINEMOS_AGENT_HOME}/download/* ${HINEMOS_AGENT_HOME}/lib
fi

${HINEMOS_AGENT_HOME}/bin/agent_start.sh
