логин:
Скрытый текст#!/bin/bash
# exit codes of GameServer:
# 0 normal shutdown
# 2 reboot attempt
while :; do
[ -f log/java_login0.log.0 ] && mv log/java_login0.log.0 "log/`date +%Y-%m-%d_%H-%M-%S`_java_login.log"
[ -f log/stdout_login.log ] && mv log/stdout_login.log "log/`date +%Y-%m-%d_%H-%M-%S`_stdout_login.log"
#java -Djava.util.logging.manager=net.sf.l2j.util.L2LogManager -Xms1024m -Xmx1024m -cp ./../libs/*:l2jserver.jar net.sf.l2j.gameserver.GameServer > log/stdout.log 2>&1
java -Xmx512m -Xms512m -cp ./libs/javolution.jar:./libs/c3p0-0.9.1.2.jar:./libs/mysql-connector-java-5.1.8-bin.jar:./libs/l2core.jar net.sf.l2j.loginserver.L2LoginServer > log/stdout_login.log 2>&1
[ $? -ne 2 ] && break
# /etc/init.d/mysql restart
sleep 10
done
гейм:
Скрытый текст#!/bin/bash
# exit codes of GameServer:
# 0 normal shutdown
# 2 reboot attempt
echo -n "Starting GameServer "
while :; 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 -server -Xmx3500m -Xms2500m -Xmn1524m -XX:SurvivorRatio=8 -Xnoclassgc -XX:+AggressiveOpts -cp ./libs/*:./libs/lameguard-1.9.5.jar:./libs/bsh-engine.jar:./libs/bsh-2.0b5.jar:./libs/geoserver.jar:./libs/javolution.jar:./libs/c3p0-0.9.1.2.jar:./libs/mysql-connector-java-5.1.6-bin.jar:./libs/share-core.jar:./libs/jython.jar:./libs/jython-engine.jar:./libs/java-engine.jar com.lameguard.LameGuard net.sf.l2j.gameserver.GameServer > log/stdout.log 2>&1
java -server -Xmx3500m -Xms2500m -Xmn1524m -XX:SurvivorRatio=8 -Xnoclassgc -XX:+AggressiveOpts -cp ./libs/bsh-engine.jar:./libs/bsh-2.0b5.jar:./libs/javolution.jar:./libs/c3p0-0.9.1.2.jar:./libs/mysql-connector-java-5.1.8-bin.jar:./libs/l2core.jar:./libs/jython.jar:./libs/jython-engine.jar:./libs/java-engine.jar:./libs/trove.jar:./libs/commons-logging-1.1.jar:./libs/javax.servlet.jar:./libs/org.mortbay.jetty.jar:./libs/rrd4j-2.0.1.jar net.sf.l2j.gameserver.GameServer > log/stdout.log 2>&1
[ $? -ne 2 ] && break
# /etc/init.d/mysql restart
sleep 10
done