Mac OS X Dedicated Server

This document describes ways in which one can run the Mac OS X dedicated server.

launchd
Launchd was first introduced in Mac OS X 10.4. It simplifies running the armagetronad-dedicated prograpm as a daemon.

The .plist file
This file should be saved to. You can create the  directory if it doesn't yet exist.

You must edit this template. You need to insert the real path to the  directory, and you also must insert the path to where your log-files will be saved.

 <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> Label net.armagetronad.armagetronad-dedicated ProgramArguments /path/to/Armagetron Advanced Dedicated/armagetronad-dedicated --datadir /path/to/Armagetron Advanced Dedicated --daemon KeepAlive StandardOutPath /path/to/armagetronad-dedicated.log StandardErrorPath /path/to/armagetronad-dedicated.log

Loading the plist
First you must load the plist file. This is only required once. launchctl load ~/LaunchAgents/net.armagetronad.armagetronad-dedicated.plist

If you edit the plist file later you must reload the file for changes to take effect. launchctl unload ~/LaunchAgents/net.armagetronad.armagetronad-dedicated.plist launchctl load ~/LaunchAgents/net.armagetronad.armagetronad-dedicated.plist

Starting/Stopping
To start the server: launchctl start net.armagetronad.armagetronad-dedicated

To stop the server: launchctl stop net.armagetronad.armagetronad-dedicated

Running manually
To run the server from the command-line, your current working directory must be the  directory, else you must use the   option.

Option 1: cd "/path/to/Armagetron Advanced Dedicated" ./armagetronad-dedicated

Option 2: "/path/to/Armagetron Advanced Dedicated/armagetronad-dedicated" --datadir "/path/to/Armagetron Advanced Dedicated"