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