#!/bin/sh

if [ $# -ne 1 ];then
        echo "usage: $0 port"
        exit -1
fi

port=$1

CUR_PWD=`pwd`
PIDPATH=`cat ${CUR_PWD%/*}"/data/proxysql.pid"`

ps -ef | grep ${PIDPATH} | grep -v grep | grep proxysql | awk 'END {print $2 " " $3}' | xargs kill -9
