Ioquake3 on Linux issues


I have been running IOQ3 in windows for quite some time. Over the years, I’ve gotten it down to a tight little package for running my servers. Now I would like to do the same for IOQ3 Linux. For starters, I have a batch file that runs when the system starts up. It loads IOQ3 running my mod, and will start the server up again if IOQ3 crashes, or even if the power goes out, the batch file starts it all up again when windows restarts.
I’m new to Linux, and would like to know if anyone here can help point me in the right direction for the Linux equivalent of the dos batch files…

here is the batch file… if Linux can do something even close to this, we will be off to a good start.

@echo off
echo Starting 1.36 IOQUAKE 3 PW SERVER at %time% on %date%

start /wait c:\quake3\ioquake3.x86 /HIGH +set fs_game Pwrweapons +exec server.cfg +exec cvar.cfg +set sv_pure 0 +set

dedicated 2 +set g_spskill 2 +set bot_minplayers 4 +addbot keel 2 2 2 +addbot Crash 2 2 2 Crash +addbot Doom 2 2 2

+addbot Mynx 1 1 1 Mynx

:: Date stamping is formated “Sat 10/22/2005”. If you are using another format it will not work correctly
set Mth=%Date:~4,2%
set Day=%Date:~7,2%
set Hour=%Time:~0,2%
set Min=%Time:~3,2%

::echo T - 15
::PING -n 3>nul
::echo T - 14
::PING -n 3>nul
::echo T - 13
::PING -n 3>nul
::echo T - 12
::PING -n 3>nul
::echo T - 11
::PING -n 3>nul
::echo T - 10
::PING -n 3>nul
::echo T - 9
::PING -n 3>nul
::echo T - 8
::PING -n 3>nul
::echo T - 7
::PING -n 3>nul
::echo T - 6
::PING -n 3>nul
::echo T - 5
::PING -n 3>nul
::echo T - 4
::PING -n 3>nul
::echo T - 3
::PING -n 3>nul
::echo T - 2
::PING -n 3>nul
echo T - 1
PING -n 3>nul
goto TOP


It’s called shell scripting in Linux, for example we have some scripts here:
Those scripts compile ioquake3, install it, and run a server under Linux. We have a sys admin guide here for using those somewhat efficiently, although they aren’t configured to run as a service under different Linux distributions. For that you’ll want to check out your distribution’s documentation about starting up services at boot. Or generically you can use cron.


Looks like a good place to start. Thanks TimeDoctor.


I haven’t looked at this stuff in years, and I wasn’t well versed when I did. I’m currently running ioquake3 dedicated on an ubuntu box, but I do not have anything automated. it’s just something for a few friends, and my kids to play once a month. 12 years ago when I was running multiple servers I had scripts that were given to me to use. I had started typing about cron jobs, and scripts, but did a search for something, and found this entry for ubuntu:

I may actually set this up, looks pretty easy. :slight_smile:

I don’t know if you use the “screen” command, but it allows you to run the server in a “window” (CLI) that you can background, and come back to later and reattach and use. This is especially useful if you remotely manage your server, and you want to issue commands directly in the server such as “status” “vstr_nextmap” “kick” “ban”. When using the screen command, don’t forget to use the screen -wipe if you have a screen session crash. this will clean up orphaned screens.