-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathrcon.1
98 lines (80 loc) · 2.36 KB
/
rcon.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
.TH RCON 1 "September 19, 2016" "version 0.5" "USER COMMANDS"
.SH NAME
rcon \- command line source rcon client
.SH SYNOPSIS
.B rcon [options] command
.P
.SH DESCRIPTION
rcon can be used as a command line remote console client for source game servers. It supports a configuration file to safely store your rcon passwords. It will execute the command given, or - if no command is given - will read a list of commands from standard input.
.SH OPTIONS
.TP
\fB\-c \-\-config\fR filename
Specify an alternate path to the configuration file. Default is $HOME/.rconrc
.
.TP
\fB\-d \-\-debug\fR
Enable debug mode. Sent and received packages are shown on terminal.
.
.TP
\fB\-h \-\-help\fR
Usage
.
.TP
\fB\-H \-\-host\fR hostname
Hostname or IP address of the server
.
.TP
\fB\-m \-\-minecraft\fR
Minecraft compability mode.
.
.TP
\fB\-n \-\-nowait\fR
Do not wait for a reply from the server, just send and quit.
.
.TP
\fB\-p \-\-port\fR port
Port or service name
.
.TP
\fB\-P \-\-password\fR password
Remote console password of the server
.
.TP
\fB\-s \-\-server\fR name
Use this server from the configuration file
.
.SH FILES
.TP
.B
~/.rconrc
The default configuration filename for rcon.
.SH CONFIGURATION FILE
The configuration file must be in the key file format (commonly known as INI file) and adhere to the following schema:
[myserver]
hostname = 173.43.63.111
port = 27003
password = somepass
# remove the line below if it the server is not minecraft
minecraft = true
This server can then be used from the command line with the
.B -s
parameter:
rcon -s myserver status
The command line still trumps the configuration file, so the following would override the port to 27010:
rcon -s myserver -p 27010 status
.SH INTERPRETER
rcon can also be used as script interpreter. Just specify the rcon binary in the she bang. Lines starting with a hash sign are ignored, other non-empty lines are being treated as commands. The following script runs two commands:
#!/usr/bin/rcon -s myserver
# Query status
status
# List plugins
sm plugins list
.SH EXAMPLES
Send status to a server with given IP, port and password:
rcon -H 173.43.63.11 -p 27003 -P somepass status
Send a patch of commands to server:
echo -e "status\\nsm plugins list" | rcon -s myserver
.SH BUGS
Report bugs at https://github.com/n0la/rcon
.SH AUTHOR
Copyright (c) 2016 Florian Stinglmayr <[email protected]>