Updated the wrapper.in.1 CAVEATS section.
[iii.git] / doc / wrapper.in.1
blob9b6dc1d2de6e492660251ec92cc2f6822c50efe1
1 .Dd $Mdocdate$
2 .Dt WRAPPER 1
3 .Os
4 .Sh NAME
5 .Nm wrapper
6 .Nd wraps
7 .Xr ii 1
8 and allows execution on connect
9 .Sh SYNOPSIS
10 .Nm
11 .Op Fl i Ar ii arg
12 .Op Fl s Ar sh arg
13 .Fl -
14 .Ar host1 port1
15 .Op Ar host2 port2 ...
16 .Sh DESCRIPTION
17 The
18 .Nm
19 utility randomly selects one pair of
20 .Ar hosts
21 and
22 .Ar ports
23 before it passes the pair as arguments to
24 .Xr ii 1
25 using
26 .Xr system 3 .
27 Additional arguments can be given to
28 .Xr ii 1
29 by specifying them in
30 .Ar ii arg .
31 In case
32 .Xr ii 1
33 exits, this procedure is done all over again.
34 .Pp
36 .Ar sh arg
37 is given,
38 .Nm
39 forks and then initializes
40 .Xr ii 1 .
41 The child process sleeps for 60 seconds (default) before passing
42 .Ar sh arg
44 .Xr system 3 .
45 This is useful in order to, for example, authenticate with NickServ or rejoin
46 IRC channels after a disconnection.
47 .Sh SEE ALSO
48 .Xr ii 1 ,
49 .Xr sh 1 ,
50 .Xr fork 3 ,
51 .Xr sleep 3 ,
52 .Xr system 3
53 .Sh HISTORY
54 The development of
55 .Nm
56 began in the early 2011's with the first version released on January 9, 2011
57 via
58 .Lk http://repo.or.cz/w/iii.git .
59 .Sh CAVEATS
60 Notice that
61 .Xr sh 1
62 meta-characters must be escaped in both
63 .Ar ii arg
64 and
65 .Ar sh arg
66 and that the
67 .Fl s
68 and
69 .Fl p
70 flags of
71 .Xr ii 1
72 have no effect in
73 .Ar ii arg .
74 .Pp
75 To prevent
76 .Xr ii 1
77 from choosing different server directories as connections are made to various
78 .Ar hosts ,
79 pass it the
80 .Fl d
81 flag.
82 The argument of the flag will override this part of the file path.
83 .Pp
85 .Nm
86 changes the working directory to "/", all file paths must be given relative to
87 that directory.