tuoheng_algN/stop.sh

19 lines
801 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
conda_env="alg"
pid=`ps x | grep "/home/th/anaconda3/envs/${conda_env}/bin/python3.8" | grep -v grep | awk '{print $1}'`
if [ -n "$pid" ]; then
kill -9 ${pid};
echo "杀掉当前alg进程, 进程号:$pid"
fi
sleep 1
pid_end=`ps x | grep "/home/th/anaconda3/envs/${conda_env}/bin/python3.8" | grep -v grep | awk '{print $1}'`
if [ -n "$pid_end" ]; then
echo "###############################################################";
echo "alg停止失败, $pid_end"
echo "###############################################################";
exit 1
else
echo "###############################################################";
echo "alg停止成功!!!!!!!!!!!!!!!!!!!!!"
echo "###############################################################";
fi