From bf0d7d8c08527d7150027e1bc3ae2c8499c4ca97 Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Tue, 7 Jul 2020 20:08:57 +0200 Subject: Add some man pages --- man/meson.build | 48 +++++++++ man/minecctl.xml | 280 ++++++++++++++++++++++++++++++++++++++++++++++++ man/minecproxy.conf.xml | 209 ++++++++++++++++++++++++++++++++++++ 3 files changed, 537 insertions(+) create mode 100644 man/meson.build create mode 100644 man/minecctl.xml create mode 100644 man/minecproxy.conf.xml (limited to 'man') diff --git a/man/meson.build b/man/meson.build new file mode 100644 index 0000000..88f34ef --- /dev/null +++ b/man/meson.build @@ -0,0 +1,48 @@ +# SPDX-License-Identifier: LGPL-2.1+ + +man_pages = [ + { + 'section': '1', + 'name': 'minecctl', + }, { + 'section': '5', + 'name': 'minecproxy.conf', + } +] + +xsltproc = find_program('xsltproc') + +xsl = 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl' +xsl_test = run_command(xsltproc, '--nonet', xsl) +if xsl_test.returncode() != 0 + error('The DocBook XSL stylesheet for "@0@" was not found.'.format(xsl)) +endif + +xsltproc_flags = [ + '--nonet', + '--stringparam', 'man.output.quietly', '1', + '--stringparam', 'funcsynopsis.style', 'ansi', + '--stringparam', 'man.authors.section.enabled', '0', + '--stringparam', 'man.copyright.section.enabled', '0', +] + +xslt_cmd = [xsltproc, xsltproc_flags, '-o', '@OUTPUT0@', xsl, '@INPUT@'] + +foreach man_page: man_pages + section = man_page['section'] + name = man_page['name'] + xml_input = name + '.xml' + man_output = name + '.' + section + + page = custom_target( + man_output, + input: xml_input, + output: man_output, + command: xslt_cmd, + build_by_default: true, + install: true, + install_dir: join_paths(get_option('mandir'), 'man' + section), + ) +endforeach + + diff --git a/man/minecctl.xml b/man/minecctl.xml new file mode 100644 index 0000000..c410d40 --- /dev/null +++ b/man/minecctl.xml @@ -0,0 +1,280 @@ + + + + + + + + minecctl + minecproxy + + + Developer + David + Härdeman + + + + + + minecctl + 1 + + + + minecctl + Interact with Minecraft servers + + + + + minecctl + OPTIONS + COMMAND + + + + + Description + + minecctl may be used to communicate with, and + control, Minecraft servers. It can also be used to perform various + checks on minecproxy server configuration files. + + + Commands are usually performed on servers defined by corresponding + configuration files in the minecproxy configuration + directory, but server connection details can also be set manually + to control servers which have no configuration files (see options + , and below). + + + + + Commands + The following commands are understood: + + + + list + + List all known servers (i.e. servers with configuration files). + + + + + lint + + Check the validity of all known server configuration files. + + + + + status SERVER + + Show the current status of SERVER + (or all known servers if SERVER + is not specified). + + + + + ping SERVER + + Check if SERVER is running + (if SERVER is not specified, it must + be defined via command line options, see options + and below). + + + + + stop SERVER + + Stop SERVER + (if SERVER is not specified, it must + be defined via command line options, see option + below). Note that servers with active players will not be + stopped unless forced (i.e. if option is used). + + + + + stopall + + Similar to stop but stops all + known servers (including any server specified using the + option). Like stop, + servers with active players will not be stopped unless + option is used. + + + + + pcount SERVER + + Get the current player count for SERVER + using either the rcon or + minecraft protocol + (if SERVER is not specified, it must + be defined via command line options, see options + and below). + + + + + console SERVER + + Provides an interactive rcon command + line for SERVER + (if SERVER is not specified, it must + be defined via command line options, see option + below). + + + + + cmd SERVER CMD + + Send CMD to + SERVER via the + rcon protocol + (if SERVER is not specified, it must + be defined via command line options, see option + below). Note that CMD will be interpreted + as a single command, so e.g. minecctl cmd + SERVER time set day + will be interpreted as a single command. + + + + + cmds SERVER CMDS + + Similar to cmd above, but allows multiple commands + to be sent to the server. Use quotes to separate commands, e.g. + minecctl cmds SERVER + time set day + say Enjoy the sun. + + + + + SERVER CMD + + Shorthand for cmd SERVER + CMD. + + + + + SERVER + + Shorthand for + console SERVER. + + + + + + + + Options + The following options are understood: + + + + + + + Use PASSWORD when + connecting via rcon to a server. If not set, + the password (if any) from the SERVER + configuration file will be used. + + + + + + + + Use ADDRESS when connecting via + rcon to a server. If not set, the address + (if any) from the SERVER configuration + file will be used. + + + + + + + + Use ADDRESS when connecting via + the minecraft protocol to a server + (only used for some commands such as pcount, + status and ping). + If not set, the address (if any) from the + SERVER configuration file will be used. + + + + + + + + Look for SERVER configuration files + in DIR instead of the default + directory (/etc/minecproxy/). + + + + + + + + + Normally minecctl will check the current + player count and refuse to stop a server with active players. + This option means that the given server(s) will be stopped + even if there are active players. + + + + + + + + Output extra logging information. + + + + + + + + Output debugging information (implies ). + + + + + + + + Prints a list of valid options/commands and exits. + + + + + + + + See Also + + minecproxy1, + minecproxy.conf5, + minecproxy.mcserver5 + + + + diff --git a/man/minecproxy.conf.xml b/man/minecproxy.conf.xml new file mode 100644 index 0000000..65eaeac --- /dev/null +++ b/man/minecproxy.conf.xml @@ -0,0 +1,209 @@ + + + + + + + + minecproxy.conf + minecproxy + + + Developer + David + Härdeman + + + + + + minecproxy.conf + 5 + + + + minecproxy.conf + Basic settings for minecproxy + + + + minecproxy.conf + + + + Description + + minecproxy.conf provides the ability to + control some basics of minecproxy. + The file is expected to be in the main configuration directory + of minecproxy (see + minecproxy1) + and uses a plain text ini-style format simlar to what + systemd uses. + + + The file has a single section titled [MinecProxy], and comments + can be prefixed with #. The defaults should + be fine for the majority of users, meaning that no further + configuration is necessary and this file can be omitted. + + + + + Options + The following options are understood: + + + + + + Instead of constanly announcing the configured + Minecraft servers, listen to + the multicase messages sent by Minecraft + clients when they are looking for servers (i.e. joining + a certain multicast group) and only then start sending announce + messages on the local network. This cuts down on the network + traffic (this feature should be considered + experimental). + + + + + + + The name of the network interface (e.g. eth0 + to use when listening for IGMP messages + (default: all). + + + + + + + The number of seconds to wait between sending successive + announce messages on the local network. + + + + + + + The number of seconds to wait between performing + connection attempts when a client is connecting to a proxy + type server (see + minecproxy.mcserver5 + for a discussion of server types). Mostly useful when + minecproxy is in the process of starting + up a server. + + + + + + + How many connection attempts to perform (with a wait + of seconds in + between each attempt) before giving up. + + + + + + + Takes a boolean argument specifying whether to set the + TCP_DEFER_ACCEPT option on proxy + sockets. Said option allows minecproxy + to defer accepting connections until the client starts + sending data, which conserves resources (see + tcp7 + for further details). + + + + + + + Takes a boolean argument specifying whether to set the + IP_FREEBIND option on proxy + sockets. Said option allows minecproxy + to listen to addresses which are not configured at + the time minecproxy is started, which + allows minecproxy to be started before + the network has been configured, at the cost of not being + able to catch incorrectly defined addresses (see + ip7 + for further details). + + + + + + + Takes a boolean argument specifying whether to set the + SO_KEEPALIVE option on proxy + sockets. Said option allows minecproxy + to detect dead clients earlier, which might conserve resources (see + tcp7 + for further details). + + + + + + + Takes a boolean argument specifying whether to set the + IPTOS_LOWDELAY option on proxy + sockets. Said option informs the kernel that delays + should be minimized, as the Minecraft + traffic is interactive (see + ip7 + for further details). + + + + + + + Takes a boolean argument specifying whether to set the + TCP_NODELAY option on proxy + sockets. Said option allows packets to be forwarded as soon + as possible, which should benefit interactive traffic, such + as Minecraft connections (see + tcp7 + for further details). + + + + + + + + Example + + + + + + + See Also + + minecproxy1, + minecctl1, + minecproxy.mcserver5 + + + + -- cgit v1.2.3