chiark / gitweb /
doc: Fix distribution of generated manpages.
[tripe] / doc / tripectl.1.in
CommitLineData
d6623498 1.\" -*-nroff-*-
87154d69 2.de VS
3.sp 1
4.RS
5.nf
6.ft B
7..
8.de VE
9.ft R
10.fi
11.RE
12.sp 1
13..
14.ie t \{\
15. if \n(.g \{\
16. fam P
17. \}
18.\}
d6623498 19.TH tripectl 1 "19 February 2001" "Straylight/Edgeware" "TrIPE: Trivial IP Encryption"
20.SH NAME
21tripectl \- simple client for TrIPE
22.SH SYNOPSIS
23.B tripectl
24.RB [ \-w ]
25.RB [ \-\fIoptions ]
26.RI [ command
27.RI [ args ]...]
28.br
29.B tripectl
30.RB [ \-Dl ]
31.RB [ \-f
32.IR file ]
33.RB [ \-\fIoptions ]
34.PP
35Options:
36.br
37 \&
38.RB [ \-s ]
39.RB [ \-d
87154d69 40.IR dir ]
d6623498 41.RB [ \-a
42.IR socket ]
87154d69 43.RB [ \-P
44.IR pidfile ]
d6623498 45.br
46 \&
47.RB [ \-p
48.IR program ]
49.RB [ \-S
50.IB arg , arg ,\fR...]
51.SH DESCRIPTION
87154d69 52The
53.B tripectl
1a19f865 54program is a simple client which can be used, either interactively or
55from a script, to send commands to and read status information from a
56running
87154d69 57.BR tripe (8)
58server. It can also be used to start
59.BR tripe (8),
60passing appropriate arguments and capturing logging information.
61.SS "Command-line options"
62.TP
63.B "\-h, \-\-help"
64Writes a brief description of the command-line options available to
65standard output and exits with status 0.
66.TP
67.B "\-v, \-\-version"
68Writes tripe's version number to standard output and exits with status
690.
70.TP
71.B "\-u, \-\-usage"
72Writes a brief usage summary to standard output and exits with status 0.
73.TP
74.B "\-D, \-\-daemon"
75Makes
76.B tripectl
77disassociate from the terminal and become a background process after
78connecting to the server.
79.TP
80.BI "\-d, \-\-directory=" dir
81Make
82.I dir
83the current directory, before doing anything else. Note that all the
84other filenames (e.g., the log output file) are relative to this
85directory. The default directory, if this option is not specified, is
86taken from the environment variable
87.BR TRIPEDIR ;
88if that's not defined either, a default default of
797cf76b 89.B "@configdir@"
87154d69 90is used.
91.TP
797cf76b 92.BI "\-a, \-\-admin-socket=" socket
87154d69 93If connecting to a running server, connect to the socket named
7cf0f3cc 94.IR socket ;
95if running a new server, instruct it to listen for admin
87154d69 96connections on
97.IR socket .
797cf76b
MW
98The default socket, if this option is not specified, is taken from the
99environment variable
100.BR TRIPESOCK ;
101if that's not defined either, a default default of
102.B "@socketdir@/tripesock"
103is used.
87154d69 104.TP
105.BI "\-P, \-\-pidfile=" pidfile
106Write
107.BR tripectl 's
108process-id to
109.I pidfile
110(relative to
111.IR dir ).
112If the
113.B \-D
114and
115.B \-f
116options are given, a default of
117.IB dir /tripectl.pid
118is used if you don't give a
119.B \-P
120option.
121.TP
122.B "\-s, \-\-spawn"
123Start a new server: don't connect to an existing one. Starting a
124.BR tripe (8)
125server in this manner is a good way to ensure that no log messages are
126lost. The
127.BR \-l ,
128.B \-f
129and
130.B \-D
131options are particularly useful in conjunction with
132.BR \-s .
133.TP
134.BI "\-p, \-\-spawn\-path=" path
135Implies
136.BR \-s ;
137runs the program named by
138.I path
139rather than the default
140.BR tripe .
141If
142.I path
143is actually an unqualified filename, the program to run is found using
144the
145.B PATH
146environment variable in the usual way.
147.TP
148.BI "\-S, \-\-spawn\-args=" arg , arg ,\fR...
149Implies
150.BR \-s ;
151passes the comma-separated
152.IR arg s
153to the
154.B tripe
155server on its command line. Arguments added using this option are added
156.I after
157any passed automatically by
158.B tripectl
159(e.g.,
160.BR \-a ).
161.TP
162.B "\-l, \-\-syslog"
163Send warnings and trace messages to the
164.BR syslog (8)
165service. Messages are logged using the
166.B daemon
167facility. Warnings are logged with severity
168.BR warning ;
169trace messages are logged with severity
170.BR debug .
171.TP
172.BI "\-f, \-\-logfile=" file
173Write warnings and trace messages to
174.IR file .
175On receipt of a
176.B SIGHUP
177signal,
178.B tripectl
179will close its log file and reopen a new one with the same name. This
180is useful when you rotate logs.
181.TP
182.B "\-w, \-\-warnings"
183Write warnings to standard error even when running noninteractively.
184.SS "Interactive use"
185With no arguments,
186.B tripectl
187will connect to a running server and await commands from its standard
188input. The commands are submitted to the server unchanged, and the
189results written to standard output. It will quit when it receives a
190fatal signal or an end-of-file indication from the server.
191.SS "Use from scripts"
192If arguments are given to
193.BR tripectl ,
0ed0735f
MW
194they are quoted if necessary to protect spaces and other special
195characters, concatenated with spaces between, and submitted to the
196server after connection. Any
87154d69 197.B INFO
198responses returned by the server are written to standard output (without
199the
200.B INFO
201on the front). A
202.B FAIL
203response causes the error message to be written to standard error, and
204the client to exit with a nonzero return code. An
205.B OK
206response causes the client to exit with a zero return code. Unless the
207.B \-w
208command-line option was given, any
209.B WARN
210responses are discarded; if
211.B \-w
212.I was
213given,
214.B WARN
215responses are written to standard error. In all cases,
216.B TRACE
217responses are ignored.
218.SS "Starting the tripe server"
219If any of the options
220.BR \-s ,
221.B \-p
222or
223.B \-S
224are given,
225.B tripectl
226will start a new
227.B tripe
228server, rather than connecting to an existing one. This is most useful
229if you want to collect logging information from the server, and want to
230avoid losing any. For example, the command
231.VS
232tripectl -Ds -f tripe.log
233.VE
234starts up a new server in the default directory, and captures all of its
235logging output (i.e.,
236.B WARN
237and
238.B TRACE
239messages) in the file
240.BR tripe.log .
241It stores its process-id in
242.BR tripectl.pid .
243.PP
244It's possible to communicate interactively with a newly-started server,
245or to give it a command and quit, but this is seldom useful.
246.SH "SEE ALSO"
247.BR tripe\-admin (5),
248.BR tripe (8).
249.PP
250.IR "The Trivial IP Encryption Protocol" ,
251.IR "The Wrestlers Protocol" .
252.SH "AUTHOR"
98fdb08d 253Mark Wooding, <mdw@distorted.org.uk>