chiark / gitweb /
Fix some format and other varargs errors.
[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.\"--------------------------------------------------------------------------
d6623498 30.TH tripectl 1 "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 ]
42.RB [ \-\fIoptions ]
43.RI [ command
44.RI [ args ]...]
45.br
46.B tripectl
47.RB [ \-Dl ]
48.RB [ \-f
49.IR file ]
50.RB [ \-\fIoptions ]
51.PP
52Options:
53.br
54 \&
55.RB [ \-s ]
56.RB [ \-d
87154d69 57.IR dir ]
d6623498 58.RB [ \-a
59.IR socket ]
87154d69 60.RB [ \-P
61.IR pidfile ]
d6623498 62.br
63 \&
64.RB [ \-p
46dde080 65.IR path ]
ab46a787
MW
66.RB [ \-U
67.IR user ]
68.RB [ \-G
69.IR group ]
d6623498 70.RB [ \-S
71.IB arg , arg ,\fR...]
fc916a09
MW
72.
73.\"--------------------------------------------------------------------------
74.SH "DESCRIPTION"
75.
87154d69 76The
77.B tripectl
1a19f865 78program is a simple client which can be used, either interactively or
79from a script, to send commands to and read status information from a
80running
87154d69 81.BR tripe (8)
82server. It can also be used to start
83.BR tripe (8),
84passing appropriate arguments and capturing logging information.
85.SS "Command-line options"
86.TP
87.B "\-h, \-\-help"
88Writes a brief description of the command-line options available to
89standard output and exits with status 0.
90.TP
91.B "\-v, \-\-version"
92Writes tripe's version number to standard output and exits with status
930.
94.TP
95.B "\-u, \-\-usage"
96Writes a brief usage summary to standard output and exits with status 0.
97.TP
98.B "\-D, \-\-daemon"
99Makes
100.B tripectl
101disassociate from the terminal and become a background process after
102connecting to the server.
103.TP
104.BI "\-d, \-\-directory=" dir
105Make
106.I dir
107the current directory, before doing anything else. Note that all the
108other filenames (e.g., the log output file) are relative to this
109directory. The default directory, if this option is not specified, is
110taken from the environment variable
111.BR TRIPEDIR ;
112if that's not defined either, a default default of
f7b5d108 113.B "\*(/c"
87154d69 114is used.
115.TP
797cf76b 116.BI "\-a, \-\-admin-socket=" socket
87154d69 117If connecting to a running server, connect to the socket named
7cf0f3cc 118.IR socket ;
119if running a new server, instruct it to listen for admin
87154d69 120connections on
121.IR socket .
797cf76b
MW
122The default socket, if this option is not specified, is taken from the
123environment variable
124.BR TRIPESOCK ;
125if that's not defined either, a default default of
f7b5d108 126.B "\*(/s/tripesock"
797cf76b 127is used.
87154d69 128.TP
129.BI "\-P, \-\-pidfile=" pidfile
130Write
131.BR tripectl 's
132process-id to
133.I pidfile
134(relative to
135.IR dir ).
136If the
137.B \-D
138and
139.B \-f
140options are given, a default of
141.IB dir /tripectl.pid
142is used if you don't give a
143.B \-P
144option.
145.TP
146.B "\-s, \-\-spawn"
147Start a new server: don't connect to an existing one. Starting a
148.BR tripe (8)
149server in this manner is a good way to ensure that no log messages are
150lost. The
151.BR \-l ,
152.B \-f
153and
154.B \-D
155options are particularly useful in conjunction with
156.BR \-s .
157.TP
158.BI "\-p, \-\-spawn\-path=" path
159Implies
160.BR \-s ;
161runs the program named by
162.I path
163rather than the default
164.BR tripe .
165If
166.I path
167is actually an unqualified filename, the program to run is found using
168the
169.B PATH
170environment variable in the usual way.
171.TP
172.BI "\-S, \-\-spawn\-args=" arg , arg ,\fR...
173Implies
174.BR \-s ;
175passes the comma-separated
176.IR arg s
177to the
178.B tripe
179server on its command line. Arguments added using this option are added
180.I after
181any passed automatically by
182.B tripectl
e04c2d50 183(e.g.,
87154d69 184.BR \-a ).
185.TP
ab46a787
MW
186.BI "\-U, \-\-setuid=" user
187Set uid to that of
188.I user
189(either a user name or integer uid) after initialization. Also set gid
190to
191.IR user 's
192primary group, unless overridden by a
193.B \-G
194option. If a new
195.BR tripe (8)
196server is going to be spawned then it is also passed corresponding
197.B \-U
198and
199.B \-G
200options.
201.TP
202.BI "\-G, \-\-setgid=" group
ec9b8aed
MW
203If the current effective uid is zero (i.e., the daemon was invoked as
204.BR root )
205then set gid to that of
ab46a787
MW
206.I group
207(either a group name or integer gid) after initialization. If a new
208.BR tripe (8)
209server is going to be spawned then it is also passed a corresponding
210.B \-G
211option.
212.TP
87154d69 213.B "\-l, \-\-syslog"
214Send warnings and trace messages to the
215.BR syslog (8)
216service. Messages are logged using the
217.B daemon
218facility. Warnings are logged with severity
219.BR warning ;
220trace messages are logged with severity
221.BR debug .
222.TP
223.BI "\-f, \-\-logfile=" file
224Write warnings and trace messages to
225.IR file .
226On receipt of a
227.B SIGHUP
228signal,
229.B tripectl
230will close its log file and reopen a new one with the same name. This
231is useful when you rotate logs.
232.TP
233.B "\-w, \-\-warnings"
234Write warnings to standard error even when running noninteractively.
235.SS "Interactive use"
236With no arguments,
237.B tripectl
238will connect to a running server and await commands from its standard
239input. The commands are submitted to the server unchanged, and the
240results written to standard output. It will quit when it receives a
241fatal signal or an end-of-file indication from the server.
242.SS "Use from scripts"
243If arguments are given to
244.BR tripectl ,
0ed0735f
MW
245they are quoted if necessary to protect spaces and other special
246characters, concatenated with spaces between, and submitted to the
247server after connection. Any
87154d69 248.B INFO
249responses returned by the server are written to standard output (without
250the
251.B INFO
252on the front). A
253.B FAIL
254response causes the error message to be written to standard error, and
255the client to exit with a nonzero return code. An
256.B OK
257response causes the client to exit with a zero return code. Unless the
258.B \-w
259command-line option was given, any
260.B WARN
261responses are discarded; if
262.B \-w
263.I was
264given,
265.B WARN
266responses are written to standard error. In all cases,
267.B TRACE
268responses are ignored.
269.SS "Starting the tripe server"
270If any of the options
271.BR \-s ,
e04c2d50 272.B \-p
87154d69 273or
274.B \-S
275are given,
276.B tripectl
277will start a new
278.B tripe
46dde080
MW
279server, rather than connecting to an existing one.
280.PP
281The command line for the new server is
282.IP
283.I path
284.B \-F
285.B \-d.\&
286.B \-a
287.I socket
288.I dash-S-options
289.PP
290where
291.I dash-S-options
292is the concatenation of the arguments of
293.B \-S
294options, split at commas.
295.PP
296Starting a
297.B tripe
298server through
299.B tripectl
300is most useful if you want to collect logging information from the
301server, and want to avoid losing any. For example, the command
87154d69 302.VS
303tripectl -Ds -f tripe.log
304.VE
305starts up a new server in the default directory, and captures all of its
306logging output (i.e.,
307.B WARN
308and
309.B TRACE
310messages) in the file
311.BR tripe.log .
312It stores its process-id in
313.BR tripectl.pid .
314.PP
315It's possible to communicate interactively with a newly-started server,
316or to give it a command and quit, but this is seldom useful.
fc916a09
MW
317.
318.\"--------------------------------------------------------------------------
87154d69 319.SH "SEE ALSO"
fc916a09 320.
87154d69 321.BR tripe\-admin (5),
322.BR tripe (8).
323.PP
324.IR "The Trivial IP Encryption Protocol" ,
325.IR "The Wrestlers Protocol" .
fc916a09
MW
326.
327.\"--------------------------------------------------------------------------
87154d69 328.SH "AUTHOR"
fc916a09 329.
98fdb08d 330Mark Wooding, <mdw@distorted.org.uk>
fc916a09
MW
331.
332.\"----- That's all, folks --------------------------------------------------