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

port=$1

CUR_PWD=`pwd`
#echo ${cur_pwd}
BINPATH=${CUR_PWD%/*}"/bin"
CONFPATH=${CUR_PWD%/*}"/etc/proxysql.conf"

LD_LIBRARY_PATH="${CUR_PWD%/*}/lib:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH
${BINPATH}/proxysql -c ${CONFPATH} --idle-threads
