summary refs log tree commit diff
path: root/doc/useinit.html
blob: 1450608ea945df057ecea8ad1b42bd6406504268 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<title>runit - use with traditional init</title>
</head>
<body>
<a href="http://smarden.org/pape/">G. Pape</a><br>
<a href="index.html">runit</a><br>
<hr>
<h1>runit - use with traditional init</h1>
<hr>
It's possible to use <i>runit</i>'s service supervision without replacing
the <i>init</i> scheme of the system.
Simply run the <i>stage 2</i> of <i>runit</i> as a service with your
current <i>init</i>.
<p>
Normally this is done by either adding <tt>/etc/runit/2</tt> as command to
</tt>/etc/rc.local</tt>, or by adding an entry for <tt>/etc/runit/2</tt> to
<tt>/etc/inittab</tt>.
<p>
In either case, you first need to copy the <i>stage 2</i> script to
<tt>/etc/runit/2</tt>:
<pre>
  # mkdir -p /etc/runit
  # cp -p /package/admin/runit/etc/2 /etc/runit/
</pre>
<hr>
If your system uses a sysvinit alike init scheme with a <tt>/etc/inittab</tt>
file, do:
<pre>
  # cat &gt;&gt;/etc/inittab &lt;&lt;EOT
  SV:123456:respawn:/etc/runit/2
  EOT
</pre>
and tell <i>init</i> to reread its configuration, e.g.:
<pre>
  # init q
</pre>
<hr>
If your system uses a BSD alike init scheme with a <tt>/etc/rc.local</tt>
script, do:
<pre>
  # cat &gt;&gt;/etc/rc.local &lt;&lt;EOT
  /etc/runit/2 &amp;
  EOT
</pre>
and reboot your system.
<hr>
<address><a href="mailto:pape@smarden.org">
Gerrit Pape &lt;pape@smarden.org&gt;
</a></address>
<small>$Id$</small>
</body>
</html>