shutdown.sh 327 B

12345678910111213141516
  1. #!/bin/sh
  2. cd `dirname $0`/../target
  3. target_dir=`pwd`
  4. pid=`ps ax | grep -i 'bankclear' | grep ${target_dir} | grep java | grep -v grep | awk '{print $1}'`
  5. if [ -z "$pid" ] ; then
  6. echo "No pd running.."
  7. exit 0;
  8. fi
  9. echo "The pd(${pid}) is running..."
  10. kill ${pid}
  11. echo "Send shutdown request to pd(${pid}) OK"