chiark / gitweb /
server/tests.at (AWAIT_KXDONE): More warning suppressions.
[tripe] / client / tripectl.1.in
CommitLineData
d6623498 1.\" -*-nroff-*-
fc916a09
MW
2.\".
3.\" Manual for the administration client
4.\"
5.\" (c) 2008 Straylight/Edgeware
6.\"
7.
8.\"----- Licensing notice ---------------------------------------------------
9.\"
10.\" This file is part of Trivial IP Encryption (TrIPE).
11.\"
12.\" TrIPE is free software; you can redistribute it and/or modify
13.\" it under the terms of the GNU General Public License as published by
14.\" the Free Software Foundation; either version 2 of the License, or
15.\" (at your option) any later version.
16.\"
17.\" TrIPE is distributed in the hope that it will be useful,
18.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
19.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20.\" GNU General Public License for more details.
21.\"
22.\" You should have received a copy of the GNU General Public License
23.\" along with TrIPE; if not, write to the Free Software Foundation,
24.\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25.
26.\"--------------------------------------------------------------------------
e99aedcf 27.so ../common/defs.man \" @@@PRE@@@
fc916a09
MW
28.
29.\"--------------------------------------------------------------------------
0647ba7c 30.TH tripectl 1tripe "19 February 2001" "Straylight/Edgeware" "TrIPE: Trivial IP Encryption"
fc916a09
MW
31.
32.\"--------------------------------------------------------------------------
33.SH "NAME"
34.
d6623498 35tripectl \- simple client for TrIPE
fc916a09
MW
36.
37.\"--------------------------------------------------------------------------
38.SH "SYNOPSIS"
39.
d6623498 40.B tripectl
41.RB [ \-w ]
5729b4bf
MW
42.RB [ \-W
43.IR things ]
d6623498 44.RB [ \-\fIoptions ]
45.RI [ command
46.RI [ args ]...]
47.br
48.B tripectl
ae8928d2 49.RB [ \-Dlt ]
d6623498 50.RB [ \-f
51.IR file ]
52.RB [ \-\fIoptions ]
53.PP
54Options:
55.br
56 \&
57.RB [ \-s ]
58.RB [ \-d
87154d69 59.IR dir ]
d6623498 60.RB [ \-a
61.IR socket ]
87154d69 62.RB [ \-P
63.IR pidfile ]
d6623498 64.br
65 \&
66.RB [ \-p
46dde080 67.IR path ]
ab46a787
MW
68.RB [ \-U
69.IR user ]
70.RB [ \-G
71.IR group ]
d6623498 72.RB [ \-S
73.IB arg , arg ,\fR...]
fc916a09
MW
74.
75.\"--------------------------------------------------------------------------
76.SH "DESCRIPTION"
77.
87154d69 78The
79.B tripectl
1a19f865 80program is a simple client which can be used, either interactively or
81from a script, to send commands to and read status information from a
82running
87154d69 83.BR tripe (8)
84server. It can also be used to start
85.BR tripe (8),
86passing appropriate arguments and capturing logging information.
87.SS "Command-line options"
88.TP
89.B "\-h, \-\-help"
90Writes a brief description of the command-line options available to
91standard output and exits with status 0.
92.TP
93.B "\-v, \-\-version"
94Writes tripe's version number to standard output and exits with status
950.
96.TP
97.B "\-u, \-\-usage"
98Writes a brief usage summary to standard output and exits with status 0.
99.TP
100.B "\-D, \-\-daemon"
101Makes
102.B tripectl
103disassociate from the terminal and become a background process after
104connecting to the server.
105.TP
106.BI "\-d, \-\-directory=" dir
107Make
108.I dir
109the current directory, before doing anything else. Note that all the
110other filenames (e.g., the log output file) are relative to this
111directory. The default directory, if this option is not specified, is
112taken from the environment variable
113.BR TRIPEDIR ;
114if that's not defined either, a default default of
f7b5d108 115.B "\*(/c"
87154d69 116is used.
117.TP
797cf76b 118.BI "\-a, \-\-admin-socket=" socket
87154d69 119If connecting to a running server, connect to the socket named
7cf0f3cc 120.IR socket ;
121if running a new server, instruct it to listen for admin
87154d69 122connections on
123.IR socket .
797cf76b
MW
124The default socket, if this option is not specified, is taken from the
125environment variable
126.BR TRIPESOCK ;
127if that's not defined either, a default default of
f7b5d108 128.B "\*(/s/tripesock"
797cf76b 129is used.
87154d69 130.TP
131.BI "\-P, \-\-pidfile=" pidfile
132Write
133.BR tripectl 's
134process-id to
135.I pidfile
136(relative to
137.IR dir ).
138If the
139.B \-D
140and
141.B \-f
142options are given, a default of
143.IB dir /tripectl.pid
144is used if you don't give a
145.B \-P
146option.
147.TP
148.B "\-s, \-\-spawn"
149Start a new server: don't connect to an existing one. Starting a
150.BR tripe (8)
151server in this manner is a good way to ensure that no log messages are
152lost. The
153.BR \-l ,
154.B \-f
155and
156.B \-D
157options are particularly useful in conjunction with
158.BR \-s .
159.TP
160.BI "\-p, \-\-spawn\-path=" path
161Implies
162.BR \-s ;
163runs the program named by
164.I path
165rather than the default
166.BR tripe .
167If
168.I path
169is actually an unqualified filename, the program to run is found using
170the
171.B PATH
172environment variable in the usual way.
173.TP
174.BI "\-S, \-\-spawn\-args=" arg , arg ,\fR...
175Implies
176.BR \-s ;
177passes the comma-separated
178.IR arg s
179to the
180.B tripe
181server on its command line. Arguments added using this option are added
182.I after
183any passed automatically by
184.B tripectl
e04c2d50 185(e.g.,
87154d69 186.BR \-a ).
187.TP
ab46a787
MW
188.BI "\-U, \-\-setuid=" user
189Set uid to that of
190.I user
191(either a user name or integer uid) after initialization. Also set gid
192to
193.IR user 's
194primary group, unless overridden by a
195.B \-G
196option. If a new
197.BR tripe (8)
198server is going to be spawned then it is also passed corresponding
199.B \-U
200and
201.B \-G
202options.
203.TP
204.BI "\-G, \-\-setgid=" group
ec9b8aed
MW
205If the current effective uid is zero (i.e., the daemon was invoked as
206.BR root )
207then set gid to that of
ab46a787
MW
208.I group
209(either a group name or integer gid) after initialization. If a new
210.BR tripe (8)
211server is going to be spawned then it is also passed a corresponding
212.B \-G
213option.
214.TP
87154d69 215.B "\-l, \-\-syslog"
216Send warnings and trace messages to the
217.BR syslog (8)
218service. Messages are logged using the
219.B daemon
220facility. Warnings are logged with severity
221.BR warning ;
222trace messages are logged with severity
223.BR debug .
224.TP
225.BI "\-f, \-\-logfile=" file
226Write warnings and trace messages to
227.IR file .
ae8928d2
MW
228The
229.I file
230may be
231.RB ` \- '
232to request output to stdout, or
233.RB ` ! '
234to request output to stderr. If a proper filename is given (rather than
235one of these special tokens), then on receipt of a
87154d69 236.B SIGHUP
237signal,
238.B tripectl
ae8928d2
MW
239will close its log file and reopen a new one with the same name; this is
240useful when you rotate logs.
241.TP
242.B "\-t, \-\-no-timestamp"
243When logging to a file (with
244.BR \-f ),
245don't prefix log items with a timestamp. This is useful when the log
246output is being captured by some process which will add its own
247timestamps anyway.
87154d69 248.TP
249.B "\-w, \-\-warnings"
250Write warnings to standard error even when running noninteractively.
5729b4bf
MW
251.TP
252.BI "\-W, \-\-watch=" things
253When running as a client, arrange to receive asynchronous messages as
254described by
255.IR things ,
256which should be a trace list suitable for passing to the server's
257.B WATCH
258command: see
259.BR tripe-admin (5)
260for more details. This overrides the
261.B \-w
262flag in noninteractive use.
87154d69 263.SS "Interactive use"
264With no arguments,
265.B tripectl
266will connect to a running server and await commands from its standard
267input. The commands are submitted to the server unchanged, and the
268results written to standard output. It will quit when it receives a
269fatal signal or an end-of-file indication from the server.
270.SS "Use from scripts"
271If arguments are given to
272.BR tripectl ,
0ed0735f
MW
273they are quoted if necessary to protect spaces and other special
274characters, concatenated with spaces between, and submitted to the
275server after connection. Any
87154d69 276.B INFO
277responses returned by the server are written to standard output (without
278the
279.B INFO
280on the front). A
281.B FAIL
282response causes the error message to be written to standard error, and
283the client to exit with a nonzero return code. An
284.B OK
285response causes the client to exit with a zero return code. Unless the
286.B \-w
287command-line option was given, any
288.B WARN
289responses are discarded; if
290.B \-w
291.I was
292given,
293.B WARN
294responses are written to standard error. In all cases,
295.B TRACE
296responses are ignored.
297.SS "Starting the tripe server"
298If any of the options
299.BR \-s ,
e04c2d50 300.B \-p
87154d69 301or
302.B \-S
303are given,
304.B tripectl
305will start a new
306.B tripe
46dde080
MW
307server, rather than connecting to an existing one.
308.PP
309The command line for the new server is
310.IP
311.I path
312.B \-F
313.B \-d.\&
314.B \-a
315.I socket
316.I dash-S-options
317.PP
318where
319.I dash-S-options
320is the concatenation of the arguments of
321.B \-S
322options, split at commas.
323.PP
324Starting a
325.B tripe
326server through
327.B tripectl
328is most useful if you want to collect logging information from the
329server, and want to avoid losing any. For example, the command
87154d69 330.VS
331tripectl -Ds -f tripe.log
332.VE
333starts up a new server in the default directory, and captures all of its
334logging output (i.e.,
335.B WARN
336and
337.B TRACE
338messages) in the file
339.BR tripe.log .
340It stores its process-id in
341.BR tripectl.pid .
342.PP
343It's possible to communicate interactively with a newly-started server,
344or to give it a command and quit, but this is seldom useful.
fc916a09
MW
345.
346.\"--------------------------------------------------------------------------
87154d69 347.SH "SEE ALSO"
fc916a09 348.
87154d69 349.BR tripe\-admin (5),
350.BR tripe (8).
351.PP
352.IR "The Trivial IP Encryption Protocol" ,
353.IR "The Wrestlers Protocol" .
fc916a09
MW
354.
355.\"--------------------------------------------------------------------------
87154d69 356.SH "AUTHOR"
fc916a09 357.
98fdb08d 358Mark Wooding, <mdw@distorted.org.uk>
fc916a09
MW
359.
360.\"----- That's all, folks --------------------------------------------------