chiark / gitweb /
Ignore parts of build system.
[tripe] / doc / tripectl.1
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
54is a simple client which can be used, either interactively or from a
55script, to send commands to and read status information from a running
56.BR tripe (8)
57server. It can also be used to start
58.BR tripe (8),
59passing appropriate arguments and capturing logging information.
60.SS "Command-line options"
61.TP
62.B "\-h, \-\-help"
63Writes a brief description of the command-line options available to
64standard output and exits with status 0.
65.TP
66.B "\-v, \-\-version"
67Writes tripe's version number to standard output and exits with status
680.
69.TP
70.B "\-u, \-\-usage"
71Writes a brief usage summary to standard output and exits with status 0.
72.TP
73.B "\-D, \-\-daemon"
74Makes
75.B tripectl
76disassociate from the terminal and become a background process after
77connecting to the server.
78.TP
79.BI "\-d, \-\-directory=" dir
80Make
81.I dir
82the current directory, before doing anything else. Note that all the
83other filenames (e.g., the log output file) are relative to this
84directory. The default directory, if this option is not specified, is
85taken from the environment variable
86.BR TRIPEDIR ;
87if that's not defined either, a default default of
88.BR /var/lib/tripe
89is used.
90.TP
91.BI "\-a, \-\-admin=" socket
92If connecting to a running server, connect to the socket named
93.IR socket ; if running a new server, instruct it to listen for admin
94connections on
95.IR socket .
96.TP
97.BI "\-P, \-\-pidfile=" pidfile
98Write
99.BR tripectl 's
100process-id to
101.I pidfile
102(relative to
103.IR dir ).
104If the
105.B \-D
106and
107.B \-f
108options are given, a default of
109.IB dir /tripectl.pid
110is used if you don't give a
111.B \-P
112option.
113.TP
114.B "\-s, \-\-spawn"
115Start a new server: don't connect to an existing one. Starting a
116.BR tripe (8)
117server in this manner is a good way to ensure that no log messages are
118lost. The
119.BR \-l ,
120.B \-f
121and
122.B \-D
123options are particularly useful in conjunction with
124.BR \-s .
125.TP
126.BI "\-p, \-\-spawn\-path=" path
127Implies
128.BR \-s ;
129runs the program named by
130.I path
131rather than the default
132.BR tripe .
133If
134.I path
135is actually an unqualified filename, the program to run is found using
136the
137.B PATH
138environment variable in the usual way.
139.TP
140.BI "\-S, \-\-spawn\-args=" arg , arg ,\fR...
141Implies
142.BR \-s ;
143passes the comma-separated
144.IR arg s
145to the
146.B tripe
147server on its command line. Arguments added using this option are added
148.I after
149any passed automatically by
150.B tripectl
151(e.g.,
152.BR \-a ).
153.TP
154.B "\-l, \-\-syslog"
155Send warnings and trace messages to the
156.BR syslog (8)
157service. Messages are logged using the
158.B daemon
159facility. Warnings are logged with severity
160.BR warning ;
161trace messages are logged with severity
162.BR debug .
163.TP
164.BI "\-f, \-\-logfile=" file
165Write warnings and trace messages to
166.IR file .
167On receipt of a
168.B SIGHUP
169signal,
170.B tripectl
171will close its log file and reopen a new one with the same name. This
172is useful when you rotate logs.
173.TP
174.B "\-w, \-\-warnings"
175Write warnings to standard error even when running noninteractively.
176.SS "Interactive use"
177With no arguments,
178.B tripectl
179will connect to a running server and await commands from its standard
180input. The commands are submitted to the server unchanged, and the
181results written to standard output. It will quit when it receives a
182fatal signal or an end-of-file indication from the server.
183.SS "Use from scripts"
184If arguments are given to
185.BR tripectl ,
186they are concatenated with spaces between and submitted to the server
187after connection. Any
188.B INFO
189responses returned by the server are written to standard output (without
190the
191.B INFO
192on the front). A
193.B FAIL
194response causes the error message to be written to standard error, and
195the client to exit with a nonzero return code. An
196.B OK
197response causes the client to exit with a zero return code. Unless the
198.B \-w
199command-line option was given, any
200.B WARN
201responses are discarded; if
202.B \-w
203.I was
204given,
205.B WARN
206responses are written to standard error. In all cases,
207.B TRACE
208responses are ignored.
209.SS "Starting the tripe server"
210If any of the options
211.BR \-s ,
212.B \-p
213or
214.B \-S
215are given,
216.B tripectl
217will start a new
218.B tripe
219server, rather than connecting to an existing one. This is most useful
220if you want to collect logging information from the server, and want to
221avoid losing any. For example, the command
222.VS
223tripectl -Ds -f tripe.log
224.VE
225starts up a new server in the default directory, and captures all of its
226logging output (i.e.,
227.B WARN
228and
229.B TRACE
230messages) in the file
231.BR tripe.log .
232It stores its process-id in
233.BR tripectl.pid .
234.PP
235It's possible to communicate interactively with a newly-started server,
236or to give it a command and quit, but this is seldom useful.
237.SH "SEE ALSO"
238.BR tripe\-admin (5),
239.BR tripe (8).
240.PP
241.IR "The Trivial IP Encryption Protocol" ,
242.IR "The Wrestlers Protocol" .
243.SH "AUTHOR"
244Mark Wooding, <mdw@nsict.org>