#!/bin/bash
PID=$(ps -e|grep $1|awk '{printf $1}')
if [ $? -eq 0 ]; then
echo "process id:$PID"
else
echo "process $1 not exit"
exit
fi
kill -9 ${PID}
if [ $? -eq 0 ];then
echo "kill $1 success"
echo "kill $1 fail"
$1 &