linux 环境下进程被 killed掉原因分析和解决方法
文章记录:
https://blog.csdn.net/ktigerhero3/article/details/80004315
问题详情:
进程被系统killed后,重启进程无效。
最终结果记录:
flag=`ps aux|grep "SWG"|grep -v "grep"|wc -l`
if [ $flag == 0 ]
then
source /etc/profile
cd /home/guest/swg/web/tm.SWG/
node start.js &
time=$(date "+%Y-%m-%d %H:%M:%S")
echo -n $time >> /home/guest/swg/log/restart
echo ": restart SWG" >> /home/guest/swg/log/restart
else
#echo "SWG is running"
flag=1
fi
还没有评论,来说两句吧...