Pong

July 7th 2014, Installing the Pong Server

June 28th 2014 Installing a Test Server | | July 8th 2014 Client Pairing

As explained in the previous section we need to compile and add the pong server to launch control.

First we check out and compile the pong server via the following command line:

svn co http://svn.code.sf.net/p/libpong/code/libpong/pong pong
cd pong
cmake .
sudo make install

This installs the “Pong” server in /Applications/pong.app/Contents/MacOS/pong.

Then we ensure that the server is not run with root permissions, since it is under active development and thus most likely vulnerable to attacks. Therefore we create a standard non-admin user account “devel”, which is the user that is ought to run the server.

After that we copy the following plist file “org.open-terrain.pong.plist” in “/Library/LaunchDaemons”

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>Debug</key>
        <false/>
        <key>GroupName</key>
        <string>staff</string>
        <key>Label</key>
        <string>org.open-terrain.pong</string>
        <key>OnDemand</key>
        <false/>
        <key>ProgramArguments</key>
                <array>
                <string>/Applications/pong.app/Contents/MacOS/pong</string>
                <string>--no-gui</string>
                <string>--backup</string>
                </array>
        <key>ServiceDescription</key>
        <string>Pong Server</string>
        <key>UserName</key>
        <string>devel</string>
</dict>
</plist>

And load the pong service into Mac OS X launch control (as user “devel”):

devel> launchctl load /Library/LaunchDaemons/org.open-terrain.pong.plist

If there is a firewall running on the server, we need to allow tcp on port 10000 for any connection.

To see if the server is running

devel> launchctl list | grep pong

The launched server is persistent and will be relaunched after boot.

If the server is no longer needed:

devel> launchctl unload /Library/LaunchDaemons/org.open-terrain.pong.plist


June 28th 2014 Installing a Test Server | | July 8th 2014 Client Pairing

Options: