#!/bin/sh

CWD=`pwd`
export CLI_ROOT=$CWD/..
export CLI_DEBUG=/ISM/cli/log/
export CLI_LOG_PACKAGE=/OSM/log/cur_debug

if [  ! -d $CLI_DEBUG  ]; then
    mkdir -p $CLI_DEBUG
fi

cd $CLI_ROOT/conf/

PARAM=$1
if [ -n "$PARAM" ];then
  case $PARAM in
    stop)
		killall -s 9 cli_server_mon.sh 2>/dev/null
		./cli_server.sh stop
		exit 0
		;;
    start)
		./cli_server_mon.sh &
		exit 0
		;;
    *) echo "usage:$0 [stop|start]"
		exit 1
		;;
  esac   
fi
echo "usage:$0 [stop|start]"
exit 1
