Donations
|
If you wish to make a donation you can by clicking the image below.
|
|
|
|
19th December, 2007, 04:00 PM
|
Killing Spree
|
|
Join Date: Jun 2006
Location: Netherlands
Posts: 33
|
|
UT3 Start/stop script
Hey all,
dont know if anyone used the 2k4 version but here is my script adjusted for UT3 linux dedicated servers.
Direct links You can use wget to get them directly to your box
- Script
Command: wget http://aria.dominating.nl/ut-admin/ut3/ut3ss
- Install/Help
Command: wget http://aria.dominating.nl/ut-admin/ut3/INSTALL
Package
- Script+install/help
Command: wget http://aria.dominating.nl/ut-admin/ut3/ut3ss.tar.gz
Unpack: tar -xzf ut3ss.tar.gz
What it can do
Commandline options
- start, this starts the server in background. All server output goes into logfile
- stop, this stops the running server
- restart, this restarts the running server
- check, this checks if the server is running and gives online or offline back
- status, this checks if the server is running and if not restart the server
- debug, this starts the server but wont background the process. All server output
will be showed on screen. To stop hit CTRL+C (this kills the running server!).
Note: There was a line in the INSTALL file that said that it was not possible to run 2 servers from 1 dir.. That is a lie. Just make sure you use different logfiles and pids for each instance
Have fun and if there are comments they can be places here. There is also an irc channel and forum listed in the script for support.
Issues:
- Double spaces in gameopt makes in impossible to stop the server [fixed]
Download files are updated version 0.4.1
For people that dont want to redownload the files here is the fix IF you had problems with multiple spaces.
After this line:
realbin="./ut3-bin"
Add this line:
gameopt=`echo ${gameopt}| sed s/"[ ]\{2,\}"/" "/g`
This will remove all extra spaces in the gameopt.
Regards.
Last edited by skully : 20th December, 2007 at 08:55 PM.
Reason: issues fixed
|
19th December, 2007, 05:15 PM
|
Forum Newcomer
|
|
Join Date: Dec 2007
Posts: 7
|
|
Brilliant!
---Mike
|
19th December, 2007, 05:26 PM
|
Killing Spree
|
|
Join Date: Jun 2006
Location: Netherlands
Posts: 33
|
|
Thanks,
i live on these replies
You got it working then i asume?
Regards
|
19th December, 2007, 07:17 PM
|
|
Rampage
|
|
Join Date: Aug 2002
Location: Netherlands
Posts: 71
|
|
BIG THXZ
i was looking for 1... THUMBS UP
edit:
Starting goes fine, stopping doesn't
Stopping Clan UT3 dedicated server: server not running or crashed.
(debian)
basedir="/home/serverut3/ut3-dedicated"
gamename="Clan UT3"
gamebin="Binaries/ut3"
gamepid="${basedir}/ut3.pid"
gamelog="${basedir}/ut3.log"
gameopt="server DM-Deck?MinPlayblablablabla
Last edited by LODEEP : 19th December, 2007 at 09:22 PM.
|
20th December, 2007, 12:53 PM
|
Killing Spree
|
|
Join Date: Jun 2006
Location: Netherlands
Posts: 33
|
|
Hey Lodeep,
do you got awk installed?
You can use this command to check it. No result is not installed
dpkg -l |grep awk
If its not installed
apt-get install mawk
Other reason that might be the problem is that you changed the startup line (gameopt) once it was running. So, you start it.. Change the options, and then try to stop it. The checks in the script sees it as a different server and wont stop it because its not there. Because the server is started by the ut3 bin its hard to get a descent pid of the actual start of ut3-bin without modifying the ut3 file. By using the pid only its possible to start multiple servers with the same settings if you or someone delete the pid file. Thats not a good idea so thats why i use this method.
If you want to edit the line stop the server first, then edit and then start it again.
Last edited by skully : 20th December, 2007 at 01:28 PM.
Reason: Extra help
|
20th December, 2007, 03:24 PM
|
Forum Newcomer
|
|
Join Date: Nov 2006
Location: Netherlands
Posts: 5
|
|
Quote:
Originally Posted by LODEEP
BIG THXZ
Starting goes fine, stopping doesn't
Stopping Clan UT3 dedicated server: server not running or crashed.
(debian)
gameopt="server DM-Deck?MinPlayblablablabla
|
Got the same prob here.
Anyways, good job many thanks
|
20th December, 2007, 04:10 PM
|
|
Rampage
|
|
Join Date: Aug 2002
Location: Netherlands
Posts: 71
|
|
dpkg -l |grep awk
ii mawk 1.3.3-11 a pattern scanning and text processing langu
and i didn't change the line's when server was running
|
20th December, 2007, 06:36 PM
|
|
Forum Newcomer
|
|
Join Date: Aug 2005
Location: germany
Posts: 14
|
|
^^
Running OpenSuSE 10.1....
Script is very well !!!
|
20th December, 2007, 07:51 PM
|
Killing Spree
|
|
Join Date: Oct 2007
Posts: 24
|
|
Try implementing this method i use in my Server Startscripts. This way, you should be able to get the right pid at anytime, no matter if the PID changed due to some restarting of the Server or anything like that:
Code:
check() {
# Ueberprueft den Server
# 0 = Server ist offline
# 1 = Server ist online
# 2 = Server befindet sich gerade in einer Update Prozedur (Muss noch eingebaut werden in die check()-Funktion
# Ermitteln der PIDs des Scripts und der Serverbinary mittels pgrep
pgrep -f -u ${CSS_UNIXUSER} srcds_[^r].*port.${CSS_NETPORT} > ${CSS_SERVERPIDFILE}
pgrep -f -u ${CSS_UNIXUSER} srcds_run.*port.${CSS_NETPORT} > ${CSS_PIDFILE}
# Prüfen ob pgrep valide Daten in die .pid dateien geschrieben hat
serverpid=`cat ${CSS_SERVERPIDFILE}`
scriptpid=`cat ${CSS_PIDFILE}`
if [ -n "${scriptpid}" -o "${serverpid}" ]
then
status=1
else
status=0
rm $CSS_PIDFILE
rm $CSS_SERVERPIDFILE
fi
}
This is only the check() - Function of a CS-Source Serverscript i wrote, and the comments are in German, sorry for that, but if you have some bash scripting experience you should be able to figure out the way this is working.
Basically what i am doing is getting the full command line of the process, then look at the ports that are used in the commandline and distinguish the different Serverprocesses by the ports they are running on. This would mean, you would always have to put the Port-option into your commandline. But that isn´t really a big issue i think ;o)
Let me know what you think, and if you can use it to some extend. If not, no problem, I just thought i might give you a little alternative way of querying the running Serverprocesses ;o)
Last edited by Art_illery : 20th December, 2007 at 08:08 PM.
|
20th December, 2007, 08:00 PM
|
Killing Spree
|
|
Join Date: Jun 2006
Location: Netherlands
Posts: 33
|
|
Hey Art_illery,
thx for your reply i will look into this. And yeah is easy to understand and i know some german so it will be ok
For the ones having problems,
can you send the ut3ss file to me thru mail ( info at dominating.nl ) with a problem description. I will test it and fix it when needed. Remove gamespy id/pass.
Make sure you use a proper editor like VIM or Notepad++ under windows if you are editing it. Dos editors like Wordpad can make the file corrupt.
|
20th December, 2007, 08:16 PM
|
Killing Spree
|
|
Join Date: Jun 2006
Location: Netherlands
Posts: 33
|
|
Just had a file and this one had 2 spaces in the gameopt between 2 options. Removing one space solved the problem that it cant be stopped.
I will fix something that removes all extra spaces.
Last edited by skully : 20th December, 2007 at 08:20 PM.
|
20th December, 2007, 08:49 PM
|
Killing Spree
|
|
Join Date: Jun 2006
Location: Netherlands
Posts: 33
|
|
Issue fixed. Check 1st post for the fix
|
5th February, 2008, 04:47 PM
|
Forum Newcomer
|
|
Join Date: Apr 2005
Posts: 6
|
|
i would like to try your script but i get this when i try to d/l:
--09:39:17-- http://aria.dominating.nl/ut-admin/ut3/INSTALL
Resolving aria.dominating.nl... 213.207.100.54
Connecting to aria.dominating.nl|213.207.100.54|:80... connected.
HTTP request sent, awaiting response... 403 Forbidden
09:39:20 ERROR 403: Forbidden.
is this intentional?
|
5th February, 2008, 04:51 PM
|
Killing Spree
|
|
Join Date: Jun 2006
Location: Netherlands
Posts: 33
|
|
Sorry,
edited some files a bit too hard. Fixed now
|
23rd February, 2008, 12:53 PM
|
|
Forum Newcomer
|
|
Join Date: Dec 2005
Location: Germany, nearby Cologne
Posts: 5
|
|
It's working fine for me - 2.6.23-gentoo-r8
:-)
__________________
irc - some ut chan:
[17:28:36] <aaaaaaaaaaaaaaaaa> i dont need a fucking aimbot
[17:28:55] <Neophyte> what about one thats sexually sterile?
|
23rd February, 2009, 01:18 PM
|
Forum Newcomer
|
|
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 8
|
|
Ty m8 - will try it. CentOS 5.2
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
Thread Tools |
|
Display Modes |
Linear 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
|
|
|
|