<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>HJK Solutions: Tag runit</title>
  <subtitle type="html">We Launch Startups</subtitle>
  <id>tag:blog.hjksolutions.com,2005:Typo</id>
  <generator uri="http://www.typosphere.org" version="4.0">Typo</generator>
  <link href="http://blog.hjksolutions.com/xml/atom/tag/feed.xml" rel="self" type="application/atom+xml"/>
  <link href="http://blog.hjksolutions.com/articles/tag/runit" rel="alternate" type="text/html"/>
  <updated>2007-07-20T15:58:15-04:00</updated>
  <entry>
    <author>
      <name>Adam Jacob</name>
    </author>
    <id>urn:uuid:eb3c5be5-0f6f-46b9-9b68-d36ea1bc10ef</id>
    <published>2007-07-20T15:52:00-04:00</published>
    <updated>2007-07-20T15:58:15-04:00</updated>
    <title type="html">Using runit with Upstart</title>
    <link href="http://blog.hjksolutions.com/articles/2007/07/20/using-runit-with-upstart" rel="alternate" type="text/html"/>
    <category term="solutions" scheme="http://blog.hjksolutions.com/articles/category/solutions" label="solutions"/>
    <category term="runit" scheme="http://blog.hjksolutions.com/articles/tag/runit"/>
    <category term="upstart" scheme="http://blog.hjksolutions.com/articles/tag/upstart"/>
    <category term="ubuntu" scheme="http://blog.hjksolutions.com/articles/tag/ubuntu"/>
    <summary type="html">&lt;p&gt;When using &lt;a href="http://smarden.org/runit/"&gt;runit&lt;/a&gt; with &lt;a href="http://upstart.ubuntu.com"&gt;Upstart&lt;/a&gt; in Ubuntu 7.04, you&amp;#8217;re going to run in to a couple of problems.  The first is that the package doesn&amp;#8217;t install cleanly without the presence of &lt;code&gt;/etc/inittab&lt;/code&gt;, which Upstart doesn&amp;#8217;t need.  You can fix that with a simple:&lt;/p&gt;


&lt;pre&gt;
    &lt;code&gt;
$ sudo touch /etc/inittab
    &lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;Now, you need to actually add runit to Upstart.  You do this by putting the following in &lt;code&gt;/etc/event.d/runsvdir&lt;/code&gt;:&lt;/p&gt;


&lt;pre&gt;
    &lt;code&gt;
start on runlevel 2
start on runlevel 3
start on runlevel 4
start on runlevel 5
stop on shutdown
respawn
exec /usr/sbin/runsvdir-start
    &lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;This will cause &lt;code&gt;runsvdir-start&lt;/code&gt; to run during runlevel 2, 3, 4, and 5, stop when the system is going to be shutdown, and respawn if it goes away.&lt;/p&gt;


	&lt;p&gt;If you are on Ubuntu 6.10, the syntax is a bit different:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
start on runlevel 2
start on runlevel 3
start on runlevel 4
start on runlevel 5
stop on shutdown
respawn /usr/sbin/runsvdir-start
&lt;/code&gt;
&lt;/pre&gt;</summary>
    <content type="html">&lt;p&gt;When using &lt;a href="http://smarden.org/runit/"&gt;runit&lt;/a&gt; with &lt;a href="http://upstart.ubuntu.com"&gt;Upstart&lt;/a&gt; in Ubuntu 7.04, you&amp;#8217;re going to run in to a couple of problems.  The first is that the package doesn&amp;#8217;t install cleanly without the presence of &lt;code&gt;/etc/inittab&lt;/code&gt;, which Upstart doesn&amp;#8217;t need.  You can fix that with a simple:&lt;/p&gt;


&lt;pre&gt;
    &lt;code&gt;
$ sudo touch /etc/inittab
    &lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;Now, you need to actually add runit to Upstart.  You do this by putting the following in &lt;code&gt;/etc/event.d/runsvdir&lt;/code&gt;:&lt;/p&gt;


&lt;pre&gt;
    &lt;code&gt;
start on runlevel 2
start on runlevel 3
start on runlevel 4
start on runlevel 5
stop on shutdown
respawn
exec /usr/sbin/runsvdir-start
    &lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;This will cause &lt;code&gt;runsvdir-start&lt;/code&gt; to run during runlevel 2, 3, 4, and 5, stop when the system is going to be shutdown, and respawn if it goes away.&lt;/p&gt;


	&lt;p&gt;If you are on Ubuntu 6.10, the syntax is a bit different:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
start on runlevel 2
start on runlevel 3
start on runlevel 4
start on runlevel 5
stop on shutdown
respawn /usr/sbin/runsvdir-start
&lt;/code&gt;
&lt;/pre&gt;</content>
  </entry>
</feed>

