集体干死java 在启动.sh

时间:2021-06-16 13:55:38

#!/bin/bash
#reboot .jar
#author wangdonghui
pid=`ps -ef |grep java |awk '{print $2}'`
echo $pid
echo'------------------'
for id in $pid
do
kill -9 $id
echo 'killed $id'
done
echo'-------------'

cd /home/jar
nohup java -server -Xms512m -Xmx512m -jar vocedu-res-server.jar &
echo -e '\n'
nohup java -server -Xms512m -Xmx512m -jar vocedu-act-server.jar &
echo -e '\n'
nohup java -server -Xms512m -Xmx512m -jar vocedu-sys-server.jar &
echo -e '\n'
nohup java -server -Xms512m -Xmx512m -jar vocedu-msg-server.jar &
echo -e '\n'
cd ../vocedu-sys-web/

nohup java -server -Xms512m -Xmx512m -jar vocedu-sys-web.jar &
echo -e '\n'
ps -ef |grep java