|
|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|
| Support::Linux Servers Support forum for Linux EQEMu users. |

10-05-2006, 07:31 AM
|
|
AX Classic Developer
|
|
Join Date: May 2006
Location: filler
Posts: 2,049
|
|
In your startup script, you can add the lines;
sleep 40
wine minilogin
at the end of the script;
Code:
#!/bin/sh
P=`pwd`
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$P"
#make sure we have a place to log
mkdir -p logs 2>&1 > /dev/null
#boot up world
if [ ! -e .lock-world ] ; then
touch .lock-world
./world &
# wait for shared memory to load
sleep 15
fi
#start up the official launcher
if [ ! -e .lock-launcher ]; then
touch .lock-launcher
./eqlaunch zones &
sleep 40
wine MiniLogin.exe
fi
This will run anywhere - at least on my Mandriva distro, anyways
|

10-05-2006, 10:59 AM
|
|
Hill Giant
|
|
Join Date: Jul 2006
Posts: 166
|
|
You can detach it from the shell.
try
Code:
wine MiniLogin.exe > /tmp/Minilogin.log &
Minilogin is now working in the background and its output will be written into /tmp/Minilogin.log. I'll write an propper init script as soon as I have time.
You could also use the command nohup
Code:
nohup wine MiniLogin.exe
downside is that the output is always going to nohup.out.
You can find more about shell programming here:
http://www.freeos.com/guides/lsst/index.html
Last edited by eq4me; 10-05-2006 at 07:17 PM..
|
 |
|
 |

10-05-2006, 02:12 PM
|
|
Demi-God
|
|
Join Date: Jul 2006
Posts: 1,552
|
|
First, a disclaimer... I have no idea about Linux, this is my first attempt to write a bash script in 10 years... so forgive me if it's a) not formatted properly, b) fails on your system, or c) can be improved.
My goal was to make one script for start, stop, status, and restarting Emu. I think I have everything working except that last MiniLogin.exe thing. I've tried eq4me's last suggestion, but I am getting a "Failed to open port 5999". If I run wine MiniLogin.exe by itself, I usually get it to work (though, connecting a client *still* isn't quite working hehe...)
Ok, this post is just about the script. So, take this, tweak,and hope it comes in handy. It's a little "heavy", but adds some checks and balances.
Code:
#! /bin/bash
# Original Script Author: ???
# Editor: John Adams - 10/2006
#
case "$1" in
start)
if [ -e .lock-world ] || [ -e .lock-launcher ] || [ -e .lock-minilogin ]
then
echo "The emulator appears to already be running ?";
echo "If you are sure the server is not running, delete .lock-world and .lock-launcher."
exit 1
else
if [ "$UID" = "0" ]
then
echo WARNING ! For security reasons we advise: DO NOT RUN THE SERVER AS ROOT
exit 1
fi
echo "Attempting to start the World..."
if [ -e world ]
then
if [ ! -x world ]
then
echo "world is not executable, trying to set it"
chmod u+x world
fi
if [ -x world ]
then
ulimit -c 99999999
rm -f .world_shutdown
set -x
LNAME="peq" #launcher name
if [ "$1" = "test" ]
then
LNAME="test"
fi
P=`pwd`
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$P"
mkdir -p logs 2>&1 > /dev/null
if [ ! -e .lock-zones -a ! -e .lock-world ]
then
for f in logs/eqemu_*.log
do
if [ "$f" = "logs/eqemu_commands_zone.log" ]
then
continue;
fi
rm -f $f
done
fi
if [ ! -e .lock-world ]
then
touch .lock-world
./persist_world 2>&1 > logs/world &
sleep 15
fi
else
echo "World is still not executable. Fix this!"
exit 4
fi
else
echo "Couldnt find world"
exit 5
fi
# Launcher
echo "Attempting to start Launcher/Zones..."
if [ -e eqlaunch ]
then
if [ ! -x eqlaunch ]
then
echo "Launcher is not executable, trying to set it..."
chmod u+x eqlaunch
fi
if [ -x eqlaunch ]
then
rm -f .zone_shutdown
LNAME="zones" #launcher name
if [ ! -e .lock-launcher ]
then
touch .lock-launcher
./eqlaunch $LNAME 2>&1 > logs/launcher &
sleep 40 #wait on launchers to start minilogin
fi
else
echo "World is still not executable. Fix this!"
exit 4
fi
else
echo "Couldnt find eqlaunch"
exit 5
fi
# If MiniLogin.exe exists, launch it last (Angelox)
echo "Attempting to start MiniLogin.exe . . ."
if [ -e MiniLogin.exe ]
then
if [ ! -x MiniLogin.exe ]
then
echo "MiniLogin.exe is not executable, trying to set it..."
chmod u+x MiniLogin.exe
fi
if [ -x MiniLogin.exe ]
then
rm -f .minilogin_shutdown
if [ ! -e .lock-minilogin ]
then
touch .lock-minilogin
wine MiniLogin.exe > /tmp/Minilogin.log &
fi
else
echo "World is still not executable. Fix this!"
exit 4
fi
else
echo "Couldnt find eqlaunch"
exit 5
fi
fi
;;
stop)
echo "Attempting to stop the World..."
touch .minilogin_shutdown
touch .zone_shutdown
touch .world_shutdown
killall world eqlaunch zone wineserver MiniLogin.exe
sleep 3
if ps ax|grep -e 'w[o]rld' -e 'z[o]ne' -e 'eq[l]aunch' >/dev/null
then
killall -9 world eqlaunch zone wineserver MiniLogin.exe
sleep 2
fi
./cleanipc
rm -f .lock-zones .lock-world .lock-login .lock-launcher .lock-minilogin
;;
status)
if [ -e world.pid ]; then
echo "the server seems to be running"
exit 0
else
echo "the server seems to be stopped"
exit 3
fi
;;
restart)
echo "restart all eqemulator services - not implemented yet"
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 2
esac
exit 0
Drop this in your server dir, and run it as ./emu start|stop|status (one of those three options)
Not sure how to do the restart option. Anyone?
|
 |
|
 |
 |
|
 |

10-06-2006, 03:49 AM
|
|
AX Classic Developer
|
|
Join Date: May 2006
Location: filler
Posts: 2,049
|
|
Some of my zones are not loading fast enough, which results in client crash when booting up the dynamic zones.
An error example;
Code:
Zone bootup timer expired, bootup failed or too slow.
When zoning, usually what happens is, the new zone auto-boots and thinks it has the player in the zone. But in reality, the client is crashed for the server taking too long to boot up.
I'm thinking the reason for this is because my machine is too slow on loading all the new data I have added to the given zone (i'm runing a PIII with 1.5gig ram).
This started when I did some changes to loots, and have just about every mob in the game droping something: on big zones like the LoY zones, changes like this are massive and I imagine require extra loading time.
anyways here's a new start up I devised which adds static boot up too the slow loaders;
Code:
#!/bin/sh
wine MiniLogin.exe > logs/MiniLogin.log &
P=`pwd`
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$P"
#make sure we have a place to log
mkdir -p logs 2>&1 > /dev/null
#boot up world
if [ ! -e .lock-world ] ; then
touch .lock-world
./world &
# wait for shared memory to load
sleep 20
fi
#start up the official launcher
if [ ! -e .lock-launcher ]; then
touch .lock-launcher
./eqlaunch zones &
sleep 80
fi
./zone gunthak 7006 &
sleep 5
./zone dulak 7007 &
sleep 5
./zone torgiran 7008 &
sleep 5
./zone nadox 7009 &
sleep 5
./zone nurga 7010 &
I know it's crude compared to what you guys posted - so you "pretty" it up
And here's a working stop (I kept having port problems with mini-login and the wine-server);
Code:
#!/bin/sh
killall wine MiniLogin.exe world eqlaunch zone wineserver wine-preloader
sleep 3
if ps ax|grep -e 'w[o]rld' -e 'z[o]ne' -e 'eq[l]aunch' >/dev/null; then
killall -9 world eqlaunch zone
sleep 2
fi
./cleanipc
rm -f .lock-zones .lock-world .lock-login .lock-launcher
Last edited by Angelox; 10-06-2006 at 11:54 AM..
|
 |
|
 |

10-06-2006, 08:20 AM
|
|
Demi-God
|
|
Join Date: Jul 2006
Posts: 1,552
|
|
FYI Angelox, my Core 4 machine is currently P4 1.5GHz, 512m RAM, and a 40GB Quantum Fireball (I think that's 7200 rpm). I haven't had a zone load problem yet, but I am also not running any x-windows at all. Not sure how this stacks up against your machine.
But of course, now I have a new excuse to visit newegg.com, don't I?
|

10-06-2006, 08:46 AM
|
|
Hill Giant
|
|
Join Date: Jul 2006
Posts: 166
|
|
Just a shot in the dark:
If you are using IDE disks maybe DMA isnt turned on.
To check the rough speed of your disk(in this example /dev/hda) install the package hdparm and do
Code:
hdparm -Tt /dev/hda
The "buffered disk reads" should be well over 20 MB/s with any halfway modern harddrives.
If they arent check if DMA is turned on.
"using_dma" should be 1. If not you have an huge disk I/O performance penalty.
More in this guide, its slightly gentoo specific but quite good
http://www.gentoo-wiki.com/HOWTO_Use...ce_performance
|
 |
|
 |

10-06-2006, 08:55 AM
|
|
AX Classic Developer
|
|
Join Date: May 2006
Location: filler
Posts: 2,049
|
|
Quote:
|
Originally Posted by John Adams
FYI Angelox, my Core 4 machine is currently P4 1.5GHz, 512m RAM, and a 40GB Quantum Fireball (I think that's 7200 rpm). I haven't had a zone load problem yet, but I am also not running any x-windows at all. Not sure how this stacks up against your machine.
But of course, now I have a new excuse to visit newegg.com, don't I?
|
Your pc is much more up to date, mine is way behind (P3 875MhZ) - the problem is there,x-windows or not. my 1.5 gig of ram will not make it run any faster, just buffer things and help out with the static zones.
That's just what I use for a server, I do have my personal machine which is P4 2.5 GhZ, but I don't want to turn it into any kind of a server.
I "almost" have a P4 Celeron put together - All I need is a motherboard. I had bought one on sale, one of those "as you see" no return" deals, but turns out it's for Pentium 4 CPU only, and not Celeron. So now I have a nice, shiny new MB to look at. When I get that one running , I'll move everything to there.
|
 |
|
 |

10-06-2006, 09:04 AM
|
|
AX Classic Developer
|
|
Join Date: May 2006
Location: filler
Posts: 2,049
|
|
Actually, the static zones are pretty nice, gives you a more realistic view of the game (as in Live); mobs that get killed re-spawn again within their time limit , even if the zone is empty. Also, if a named mob is up, you can get killed, then come back try kill him again, but if you're dynamic, the zone re-boots when you die, and it's all over.
|
| Thread Tools |
|
|
| Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 06:53 PM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |