Script to help setup server on Linux
The following script sets up the directories for building and running your server. It also creates scripts to get files from the subversion servers.
It is based on the Debian guide in the wiki, but could be used on any system that has bash. Hope this helps... Code:
#!/bin/bash |
For some reason the BB software is messing up the very long line
the line should read Code:
targets="source/chatserver/chatserver source/utils/cleanipc source/utils \ |
This script is certainly helpful, but when you're creating the Start,Stop,Perist_world files there's a problem where anything that is a variable like $LNAME or `date` it puts their current values into the outputted file.
Needless to say, this makes them somewhat useless. Thanks for you effort and look forward to a fix fr this if there is one. |
I just copied the parts needed to make the Start, Stop and Persist_World script from your script manually into their appropriate files and they work fine from a already open terminal session,
but if I click on them from the file browser and tell it to Run in Terminal I get the text output, but the server doesn't come up. It doesn't seem to want to run Persist_World or EQLaunch while in this mode. To add to the oddity, if I click on Run instead of Run in Terminal it works fine. Any ideas? This is the latest stable Debian that I DLed over the weekend. |
The reason for the weirdness according to how you start it is that when you run it from a terminal you are already in your server folder, so it can find the server.
When you just run it from the "file browser" (nautilus?) you are running from your ~/.desktop, so it can't find the server or the other scripts. On my machine, I always run them like this: Code:
ssh paranoia xterm -e ./starteqemu Code:
ssh paranoia xterm -e ./stopeqemu Code:
#!/bin/bash The read command waits for a carriage return, so I see error messages if something goes awry during start-up. I've never tried to run the server by clicking on things. |
The other error you found is due to a cut-and-paste error on my part. I've inadvertently double-middle-clicked, and there are two copies of the script end-to-end.
If someone with admin privileges could remove the second copy that would be great, or even if they blow away the script I'll post a SINGLE copy of it into this thread. This stuff-up actually shows my age, as I'm still not really comfortable with graphical user interfaces. I don't think they are any more user friendly than TOPS-20 was. At least I managed to get over teletypes and IBM card readers, so I'm not a total dinosaur. |
I added cd /home/eqemu/eqemuserver/server to start script and it stilll isn't working.
I would expect that that would solve the issues of the batch thinking it's in different directory, but it's acting the same. PS Clicking is the present! |
Are you running logged in as eqemu?
have you tried making a shortcut on the panel that goes like: xterm -e /home/eqemu/server/start if you use metacity it's add launcher, add custom launcher, and put the command in the box. what happens if you open a terminal and run at the command line there? It's hard to say what's going west without some output. |
This script, though full of bugs and duplicate lines, is awesome! It took me no time at all to get the server up and running.
Ok folks, I'm in. I'm game. This is too easy now. This is my third attempt at trying to find a good way to maintain the server and keep it up to date. With everything in svn on google code, I'm very happy. This script is the perfect starting point for getting what I want done. Thanks so much! I do most of my work on CentOS servers. I'm sad to see that the server code doesn't compile for 64-bit CentOS 5.4 with out some major modifications to either your system or the code/make files from svn. I'm happy to find that CentOS 32-bit works great. Picking up the broken peices left ove from your script was very easy to do. So I want to give back. I'll try and have another version of the shell script that will actually work here soon. |
That would be great. The script (less the duplicate lines) worked for me. It would be good if we had a script that allowed ppl to build on different distributions and processors with a minimum of trouble.
I'm pretty sure that there needs to be a few changes to cater for SOD, and it would be good if the script could simplify building the login server. I won't have the energy to look at it until after my next trip to hospital <sigh>. |
Hey Kobaz! I've thought this was a great idea, and I've expanded upon what you have originally made.
First off, let me say this was a great start. I've added a configure script that I use personally, as well as fixed some bugs that I've noticed with your script. Likewise, I've put a few of my own twists on this so that the date/time and version of the script is put into the bash files. Here's the noteable changes:
I'm not sure that is a comprehensive list, but it's most of the changes I have made. This layout seems to make the updating and installation a bit simpler. I've been very happy using this and I hope the community at large can make use of it. I've included the source below. I've tested this here a few times and I'm able to get a server up and running with about 10 minutes of work (mostly involving editing configuration files). A short list, in the proper order, to make a server is listed here:
I think this pretty much sums up what I've got so far. Please let me know any comments. I'd really love to see this turned into a script that can simplify the server setup process. I think this is a good start. If anyone would like to collaborate on a wiki page for this (maybe include directions on keeping an up-to-date server as well?) or something else let me know. I'm using this personally and can roll out a new server very quickly. Here's the new eqemu.sh I've created: Code:
#!/bin/bash |
Hi Ork!
I've had a read across your script, and it's much nicer than mine. Mine was what works on my bastardised server, and I'll try yours once I've got my feet under me a bit (translation: my doctor has changed my prescriptions, and I'm so shit faced I dare not look at a shell prompt! The other day I typed "rm a_file_I_wanted_to_delete `ls`" without the double quotes due to these bloody pain drugs.... forgot to hit enter between the rm and the ls.... as for the backticks, I have no idea! Lucky I believe in backups). I guess the next step is to add some sed calls to allow for bot creation, and calls to make, along with DB tracking and server version tracking, backups and sourcing utils/sql files. I've been meaning to do that for a while now, between hospital visits. I'll eventually see how this works under different distros as well - although your script looks like it should be happy regardless. |
Kobaz,
I think some sort of sed script or similar for setting up bots/eqemuloginserver/etc would be nice. I started to go down that path, but then realized that some people might not have a stable internet connection. I've got a fast one and even getting the maps/source/etc only takes me 3 or 4 minutes, but should the SVN download fail you might need to restart that process. The problem with the sed scripts would be that you need to have downloaded the code repos, obviously, in order to run said (or 'sed', heh) scripts. I'm not so sure building that into the 'setup script' would be good. However, we might be able to make these as other little 'helper scripts' in the main folder (where the get scripts are) and allow the user to optionally run these. That would be handy for me personally. Maybe a 'enable_bots.sh', 'disable_bots.sh', and 'setup_loginserver.sh' or something to do the appropriate tasks. Just a few thoughts I had, when I started to go down that path. I just prettied up the scripts and posted it for some feedback though, so I haven't headed far down the path. -ork |
I did locate a bug in my script. There is a 'ln -s ../projecteqquests .' command which should read
'ln -s ../projecteqquests quests' as the symlink made is not correct. I fixed this manually here. Likewise, I found a command missing (from at least mine, and maybe from your script too) to make a symlink for commands.pl in the server directory. None of the quests worked until I manually made that symlink (in utils/defaults/commands.pl) so I must have somehow skipped this one. I've added it to the symtargets variable and all is well again locally. I'm not reposting the script for the 2 fixes listed above, but these do need to be done. Hope that helps! -ork |
Ha, beat me to it. If there was no such thing as school and work, I might have been able to compete!
I have a webserver on a 100Mb internet connection running SVN if you would like a spot to host the script. |
All times are GMT -4. The time now is 04:39 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.