github.com/maenmax/kairep@v0.0.0-20210218001208-55bf3df36788/libexec/stop_rep.sh (about) 1 #!/bin/sh 2 3 # Finding out the current script directory and name out of how we have been called 4 SCRIPT_DIR=`dirname $0` 5 SCRIPT_NAME=`basename $0` 6 RUN_DIR=${SCRIPT_DIR}/../run 7 8 if [ -f ${RUN_DIR}/autoendpoint.pid ]; then 9 pid=`cat ${RUN_DIR}/autoendpoint.pid` 10 if [ "x$pid" != "x" ]; then 11 kill >/dev/null 2>&1 $pid 12 fi 13 rm -f ${RUN_DIR}/autoendpoint.pid 14 else 15 echo "autoendpoint is not running!" 16 fi