#!/bin/bash

#killall -9 cluster_mgr;
MODE=${1:-double}
BINPATH=`pwd`
SBINPATH=`eval echo "${BINPATH}"`
FPATH=${SBINPATH%/*}
FPATH=`realpath $FPATH`

if [ ${MODE} == "single" ]; then
	ps -ef | grep cluster_mgr | grep ${FPATH} | grep -v grep | grep -v vim | awk '{print $2}' | xargs kill -s SIGUSR1
else
	ps -ef | grep cluster_mgr | grep ${FPATH} | grep -v grep | grep -v vim | awk '{print $2}' | xargs kill -9
fi
