#!/bin/bash if [ -a "./PID" ]; then ls /proc/$(cat PID)/cmdline if [ $? -eq 0 ]; then kill -9 $(cat PID) echo "shutdown old node center" fi rm ./PID fi