diff options
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 6 | ||||
-rw-r--r-- | README.md | 10 | ||||
-rwxr-xr-x | dom4 | 46 | ||||
-rw-r--r-- | dom4-server.service | 1 |
5 files changed, 35 insertions, 34 deletions
@@ -1,6 +1,6 @@ pkgbase = dom4-server pkgdesc = Configure and run Dominions 4 as a headless server - pkgver = 1.1.4 + pkgver = 1.1.5 pkgrel = 1 url = http://www.illwinter.com/dom4/ install = dom4-server.install @@ -13,10 +13,10 @@ pkgbase = dom4-server source = dom4-tmpfile.conf source = dom4 md5sums = 372f6150c891165d1c1dc3a26477c7de - md5sums = d7467fb7a599236f71d428a85cf05014 + md5sums = 7c6722df4f73b19e0db3c365f89eec96 md5sums = e9772a237cc540558e74235b98df8a7f md5sums = 338b8462868ecf6cc56c4a520cea6bac - md5sums = 72377d8ca4511751c00e4ec3e9ae32d7 + md5sums = 219c9aca46b988f031200263bcacc4de pkgname = dom4-server @@ -1,7 +1,7 @@ # Dominions 4 Server Configuration # Maintainer: Dian Fay <dian.m.fay@gmail.com> pkgname=dom4-server -pkgver=1.1.4 +pkgver=1.1.5 pkgrel=1 pkgdesc="Configure and run Dominions 4 as a headless server" arch=("x86_64") @@ -27,7 +27,7 @@ package() { install -Dm644 "$srcdir/dom4-tmpfile.conf" "$pkgdir/usr/lib/tmpfiles.d/dom4.conf" } md5sums=('372f6150c891165d1c1dc3a26477c7de' - 'd7467fb7a599236f71d428a85cf05014' + '7c6722df4f73b19e0db3c365f89eec96' 'e9772a237cc540558e74235b98df8a7f' '338b8462868ecf6cc56c4a520cea6bac' - '72377d8ca4511751c00e4ec3e9ae32d7') + '219c9aca46b988f031200263bcacc4de') diff --git a/README.md b/README.md index 4e1206ea6bf3..18f98916ee2a 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,13 @@ Choose a port number between 1024 and 65535 and make sure you don't have anythin If your computer is behind a router you will need to make sure the port is forwarded. It is also helpful to configure a static IP address so the routing stays consistent. Consult your router documentation for instructions. -## Game Configuration +## Usage + +Most of the game configuration is accomplished through the `dom4` program. Run it without arguments for detailed usage instructions. + +The actual game server is set up as a systemd service and can be managed via systemctl like any other service. + +### Configuration ```bash dom4 config mygame @@ -33,7 +39,7 @@ Edit the file as desired and save. The `mapfile` should reference a file either You may also want to `sudo systemctl enable dom4-server` in order to start the server automatically after reboots. -Note that only one game may be served at a time. If you configure or ready a new game, any previously active configuration will be preserved unless you are directly overwriting it. +Note that only one game may be served at a time. If you configure or ready a new game, you will be asked if you want to host it instead of the current game. Any existing configuration will be preserved. ### Deleting Games @@ -102,7 +102,7 @@ thrones 2 8 1 EOF fi - sudo -u dom4 $EDITOR /usr/share/dom4/config/$1.properties + sudo -u dom4 ${EDITOR:-nano} /usr/share/dom4/config/$1.properties mapfile=$(grep -oP "^mapfile\s+\K.+" /usr/share/dom4/config/$1.properties) mapname=$(basename $mapfile .map) @@ -123,11 +123,10 @@ EOF fi echo - fi - change $1 + change $1 - cat <<EOF + cat <<EOF Done. Start the service to let players upload their pretenders. sudo systemctl start dom4-server.service @@ -136,6 +135,15 @@ Once all pretenders have been uploaded, stop the service and set the game to rea dom4 ready EOF + else + change $1 + + cat <<EOF +Done. Restart the service to load the new configuration: + + sudo systemctl restart dom4-server.service +EOF + fi } # Set game start flag in properties file. @@ -241,32 +249,20 @@ case $1 in *) cat <<EOF -Install Dominions 4 through SteamCMD: +Dominions 4 Headless Server Interface - dom4 install +This program manages Dominions 4 installation and configuration for the headless server. Multiple games may be configured, but only one game can be actively hosted at once -- this is a true multiplayer server rather than a PBEM setup. -List configured games: +The headless server itself is a systemd service and can be managed via systemctl. - dom4 list - -Configure a new game, or edit an existing one: - - dom4 config mygame - -Set start flag for current game after all pretenders have been uploaded, prior to running service: - - dom4 ready - -Set start flag for mygame after pretenders have been uploaded and set it as current hosted game: - - dom4 ready mygame - -Delete a game (this operation is irreversible!): - - dom4 delete mygame +Usage: + dom4 install Install Dominions 4 through SteamCMD + dom4 list List configured games + dom4 config mygame Configure a new game, or edit an existing one + dom4 ready mygame Sets the start flag for mygame after all pretenders have been uploaded + dom4 delete mygame Deletes mygame (this operation is irreversible!) Service commands: - sudo systemctl start dom4-server.service sudo systemctl stop dom4-server.service sudo systemctl restart dom4-server.service diff --git a/dom4-server.service b/dom4-server.service index e3b1290d88af..451d2c3a75ea 100644 --- a/dom4-server.service +++ b/dom4-server.service @@ -6,7 +6,6 @@ After=network.target ExecStart=/usr/bin/dom4-server Type=simple User=dom4 -RemainAfterExit=yes [Install] WantedBy=multi-user.target |