[LINUX学习]sheel脚本循环KILL,并启动
#!/bin/sh
if [ -f ~/.bash_profile ];
then
. ~/.bash_profile
fi
cd /home/ddata/server/
stop(){
#kill 掉所有该java程序-循环kill
jarname='spring-boot-module-system-2.2.0'
pids=`ps -ef | grep $jarname | grep -v grep | grep -v kill|awk '{print $2}'`
echo $jarname
e
原创
2022-04-16 08:56:13 ·
1175 阅读 ·
0 评论