i want to stop python process in a script, but in the first time i don't have any process running but i should pass with my function restart :
function restart() {
stop
start
}
function start (){
exec ./server --db_host=.......
}
function stop (){
pkill python
}
the problem is when i execute restart its blocked, so can you suggest me how to have a control like this
if [i have python process runing];then pkill python
thanks