Table of Contents

doomsday-host

Command line utility for hosting dedicated servers. Starts a number of servers, monitors their status, restarts them if they crash, and maintains output log storage. Intended for automation.

Installation

Currently doomsday-host is not installed by default. You need to use CONFIG+=deng_host with qmake to include it in the build. The script will then be installed in the binary installation directory (where the doomsday executable is also located).

doomsday-host is intended to be run periodically from cron. You could for instance run it every minute or every five minutes.

.doomsdayhostrc

The configuration file ~/.doomsdayhostrc defines what the script will actually do when run. See an example below with comments (in this example, PREFIX=/home/jaakko/usr is being used to allow cron to rebuild and install the engine).

<hostconfig>
	<doomsday>/home/jaakko/usr/bin/doomsday-server</doomsday>

Location of the doomsday-server binary.

	<option>-parse</option>
	<option>/home/jaakko/host.cfg</option>
	<option>-iwad</option>
	<option>/home/jaakko/iwads/</option>

Command line options to use with all server instances.

	<branch>master</branch>
	<buildDir>/home/jaakko/src/deng/doomsday-build</buildDir>
	<qmakeCommand>qmake -r ../doomsday/doomsday.pro PREFIX=/home/jaakko/usr
                CONFIG+='debug deng_packres'</qmakeCommand>
	<rebuildTimes> 
 		<rebuild weekday="Mon" hour="11" minute="5" />
		<rebuild weekday="Wed" hour="11" minute="5" />
		<rebuild weekday="Fri" hour="11" minute="5" />
	</rebuildTimes>

Rebuild settings. At the specified times, the script will pull new changes from the git_repository, rebuild the engine, and install.

	<servers>
		<server port="13209" game="doom1-ultimate" 
			name="Deng Team (Co-op)" 
			info="Public multiplayer testing; everyone is welcome to join"
			dir="/home/jaakko/runtime/doom">
			<option>-parse</option>
			<option>/home/jaakko/coop.cfg</option>
		</server>
		<server port="13210" game="doom2" 
			name="Deng Team (Co-op)" 
			info="Public multiplayer testing; everyone is welcome to join"
			dir="/home/jaakko/runtime/doom2">
			<option>-parse</option>
			<option>/home/jaakko/coop.cfg</option>
		</server>
		<server port="13211" game="heretic" 
			name="Deng Team (Co-op)" 
			info="Public multiplayer testing; everyone is welcome to join"
			dir="/home/jaakko/runtime/heretic">
			<option>-parse</option>
			<option>/home/jaakko/coop.cfg</option>
		</server>
		<server port="13212" game="hexen" 
			name="Deng Team (Co-op)" 
			info="Public multiplayer testing; everyone is welcome to join"
			dir="/home/jaakko/runtime/hexen">
			<option>-parse</option>
			<option>/home/jaakko/coop.cfg</option>
		</server>
		<server port="13213" game="doom1-ultimate" 
			name="Deng Team (DM)" 
			info="Public multiplayer testing; everyone is welcome to join"
			dir="/home/jaakko/runtime/doom-dm">
			<option>-parse</option>
			<option>/home/jaakko/deathmatch.cfg</option>
		</server>
		<server port="13214" game="doom2" 
			name="Deng Team (DM)" 
			info="Public multiplayer testing; everyone is welcome to join"
			dir="/home/jaakko/runtime/doom2-dm">
			<option>-parse</option>
			<option>/home/jaakko/deathmatch.cfg</option>
		</server>
		<server port="13215" game="heretic" 
			name="Deng Team (DM)" 
			info="Public multiplayer testing; everyone is welcome to join"
			dir="/home/jaakko/runtime/heretic-dm">
			<option>-parse</option>
			<option>/home/jaakko/deathmatch.cfg</option>
		</server>
		<server port="13216" game="hexen" 
			name="Deng Team (DM)" 
			info="Public multiplayer testing; everyone is welcome to join"
			dir="/home/jaakko/runtime/hexen-dm">
			<option>-parse</option>
			<option>/home/jaakko/deathmatch.cfg</option>
		</server>  
	</servers>
</hostconfig>

All of these servers are started in the background. If they crash, they get automatically restarted. You'll need to manually create the runtime directories.