Start_LoginServer_noScreen.sh#!/bin/bash
cd loginserver
nohup ./LoginServer_loop.sh &
cd ..
LoginServer_loop.sh#!/bin/bash
err=1
until [ $err == 0 ];
do
[ -f log/java0.log.0 ] && mv log/java0.log.0 "log/`date +%Y-%m-%d_%H-%M-%S`_java.log"
[ -f log/stdout.log ] && mv log/stdout.log "log/`date +%Y-%m-%d_%H-%M-%S`_stdout.log"
java -Xmx256m -XX:+UseSerialGC -XX:+AggressiveOpts -cp lib/*:l2jfrozen-core.jar com.l2jfrozen.loginserver.L2LoginServer > log/stdout.log 2>&1
err=$?
# /etc/init.d/mysql restart
sleep 10;
done
Start_GameServer_noScreen.sh#!/bin/bash
cd gameserver
nohup ./GameServer_loop.sh &
cd ..
GameServer_loop.sh#!/bin/bash
DBHOST=localhost
USER=root
PASS=*************
DBNAME=l2mdb
err=1
until [ $err == 0 ];
do
#mysqlcheck -h $DBHOST -u $USER --password=$PASS -s -r $DBNAME>>"log/`date +%Y-%m-%d_%H:%M:%S`-sql_check.log"
#mysqldump -h $DBHOST -u $USER --password=$PASS $DBNAME|zip "backup/`date +%Y-%m-%d_%H:%M:%S`-l2jdb_gameserver.zip" -
[ -f log/java0.log.0 ] && mv log/java0.log.0 "log/`date +%Y-%m-%d_%H-%M-%S`_java.log"
[ -f log/stdout.log ] && mv log/stdout.log "log/`date +%Y-%m-%d_%H-%M-%S`_stdout.log"
[ -f log/chat.log ] && mv log/chat.log "log/`date +%Y-%m-%d_%H:%M:%S`-chat.log"
java -Dfile.encoding=UTF- -Xms2g -Xmx5g -Xmn512m -Xss128k -XX:PermSize=128m -XX:MaxPermSize=768m -XX:ParallelGCThreads=2 -XX:+UseConcMarkSweepGC -XX:+UseParNew$
err=$?
sleep 10
done
============================================================================================
Login serveris veikia puikiai, taciau gs neisijungia. wtf?