Jump to content
  • 0

[Help]Start Server.sh files & loop.sh how to configure??


Question

Posted

Hello guys , i have a little problem when im trying to launch my server on linux ubuntu 11.04

I cant run both Start_Game_Server_noScreen.sh and Start_LoginServer_noScreen.sh (L2JFrozen :@)

because it gives an error like "bad interpreter" !

 

But when im starting Login Server via LoginServer_loop.sh my terminal stucks but the login is online

now when i was getting a big silly smile on my face i started gameserver via GameServer_loop.sh and i said "finally i maid it" but then i've got PWNED , my terminal stucked again and the gameserver was offline!

INFO:

1)I tried many guides from almost anywhere

2)i gave the command "screen" before executing login/game server

 

Q:How can i run both login and gameserver so it can show their screens and of course to go online?

 

P.S: Its on dedicated

 

Files preview

Start_LoginServer_noScreen.sh

#!/bin/bash

echo "try to kill all realm screens"
while
pid_realm=`ps ax | grep 'SCREEN -AdmS realm ./LoginServer_loop.sh' | grep -v "g$
ps -p $pid_realm > /dev/null 2>&1;
do
echo "realm=$pid_realm";
kill $pid_realm;
done
echo realm screen...
screen -AdmS realm ./LoginServer_loop.sh
echo start...
xterm -title 'login server' -e tail -f /home/alexi/l2afterlife/server/loginserver$

LoginServer_loop.sh

#!/bin/bash
cd /home/alexi/l2afterlife/server/loginserver
err=1
until [ $err == 0 ];
do
        [ -f log/java0.log.0 ] && mv log/java0.log.0 "log/`date +%Y-%m-%d_%H-%M$
        [ -f log/stdout.log ] && mv log/stdout.log "log/`date +%Y-%m-%d_%H-%M-%$
        java -Xmx1024m -XX:+UseSerialGC -XX:+AggressiveOpts -cp lib/*:l2jfrozen$
        err=$?
#       /etc/init.d/mysql restart
        sleep 10;
done

 

Start_GameServer_noScreen.sh

#! /bin/sh

cd /home/alexi/l2afterlife/server/gameserver
echo server screen...
screen -AdmS server ./GameServer_loop.sh
echo start...

xterm -title 'Game server' -e tail -f /home/alexi/l2afterlife/server/gameserver$

 

GameServer_loop.sh

#!/bin/bash

#exit codes of GameServer:
#  0 normal shutdown
#  2 reboot attempt

cd /home/alexi/l2afterlife/server/loginserver
echo server screen...
screen -AdmS server ./GameServer_loop.sh
echo start...
err=1
until [ $err == 0 ];
do
        [ -f log/java0.log.0 ] && mv log/java0.log.0 "log/`date +%Y-%m-%d_%H-%M$
        [ -f log/stdout.log ] &&  mv log/stdout.log "log/`date +%Y-%m-%d_%H-%M-$
        [ -f log/chat.log ] && mv log/chat.log "log/`date +%Y-%m-%d_%H:%M:%S`-c$
        java -Dfile.encoding=UTF- -Xms2g -Xmx5g -Xmn512m -Xss128k -XX:PermSize=$
        err=$?
#   /etc/init.d/mysql restart

 

 

Thnx in advance

2 answers to this question

Recommended Posts

Guest
This topic is now closed to further replies.
×
×
  • Create New...