123.sh
#!/bin/bash
nohup sh mo.sh &
mo.sh
#!/bin/bash
function restartServer()
{
pkill Server
pkill java
sh run
echo "restart server time:" .. $(date)
}
ulimit -c unlimited
while true;
do
count=`pgrep -l Server |wc -l`
if [ $count -ne 4 ]; then
restartServer
continue
fi
sleep 60
done
run
#!bin/sh
ulimit -c unlimited
cd ./x64
(nohup ./LogServer) >/dev/null 2>&1 &
(nohup ./LoginServer) >/dev/null 2>&1 &
sleep 6
(nohup ./RecordServer) >/dev/null 2>&1 &
sleep 6
(nohup ./AppServer) >/dev/null 2>&1 &
echo "Start Server OK..."