<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>TikiRobot! &#187; ubuntu</title>
	<atom:link href="http://www.tikirobot.net/wp/tag/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tikirobot.net/wp</link>
	<description>Mai Tais and Blinky Lights, Ahoy!</description>
	<lastBuildDate>Wed, 01 Feb 2012 22:14:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>How to run lighttpd under upstart</title>
		<link>http://www.tikirobot.net/wp/2009/03/28/how-to-run-lighttpd-under-upstart/</link>
		<comments>http://www.tikirobot.net/wp/2009/03/28/how-to-run-lighttpd-under-upstart/#comments</comments>
		<pubDate>Sun, 29 Mar 2009 04:23:51 +0000</pubDate>
		<dc:creator>rajbot</dc:creator>
				<category><![CDATA[code code]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[support]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[upstart]]></category>

		<guid isPermaLink="false">http://www.tikirobot.net/wp/?p=2385</guid>
		<description><![CDATA[Upstart is Ubuntu&#8217;s init.d replacement. It greatly simplifies writing init.d scripts and has a great respawn feature similar to daemontool&#8217;s supervise or monit. And it comes with Ubuntu by default. For some reason, almost no one uses upstart. Even Ubuntu&#8217;s services use traditional /etc/init.d scripts instead of upstart scripts. I think this might be due [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://upstart.ubuntu.com/">Upstart</a> is Ubuntu&#8217;s init.d replacement. It greatly simplifies writing init.d scripts and has a great respawn feature similar to daemontool&#8217;s supervise or monit. And it comes with Ubuntu by default.</p>
<p>For some reason, almost no one uses upstart. Even Ubuntu&#8217;s services use traditional /etc/init.d scripts instead of upstart scripts. I think this might be due to upstart&#8217;s non-existent documentation. There is no man page for upstart, and multiple people I know who have read <a href="http://upstart.ubuntu.com/getting-started.html">the online docs</a> somehow missed the three important commands that control upstart jobs: <strong>/sbin/start</strong>, <strong>/sbin/stop</strong>, and <strong>/sbin/status</strong>!</p>
<p>Here is how it works: put an upstart script in /etc/event.d. Let&#8217;s call it /etc/event.d/foo. This script is now immediately available under upstart. Just type <tt><strong>sudo start foo</strong></tt>. That&#8217;s it.</p>
<p>I converted Ubuntu&#8217;s /etc/init.d/lighttpd script to a much shorter upstart script. The big advantage of this is upstart will restart lighttpd if it dies for some reason. This is what the upstart script looks like:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#this is an upstart script that  starts lighttpd</span>
&nbsp;
start on runlevel <span style="color: #000000;">2</span>
start on runlevel <span style="color: #000000;">3</span>
start on runlevel <span style="color: #000000;">4</span>
start on runlevel <span style="color: #000000;">5</span>
&nbsp;
stop on runlevel <span style="color: #000000;">0</span>
stop on runlevel <span style="color: #000000;">1</span>
stop on runlevel <span style="color: #000000;">6</span>
&nbsp;
respawn
<span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #660033;">-u</span> www-data lighttpd <span style="color: #660033;">-D</span> <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>lighttpd<span style="color: #000000; font-weight: bold;">/</span>lighttpd-infobase.conf</pre></div></div>

<p>That&#8217;s it! Save this script as /etc/event.d/OL-lighttpd, and then type <tt><strong>sudo start OL-lighttpd</strong></tt>. You can kill off the lighttpd process and it will get restarted.</p>
<p>If you want to configure your lighttpd to write out a pid file, you can use pre-start and post-stop script to prepare and clean up the pid file:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#this is an upstart script that  starts lighttpd</span>
&nbsp;
start on runlevel <span style="color: #000000;">2</span>
start on runlevel <span style="color: #000000;">3</span>
start on runlevel <span style="color: #000000;">4</span>
start on runlevel <span style="color: #000000;">5</span>
&nbsp;
stop on runlevel <span style="color: #000000;">0</span>
stop on runlevel <span style="color: #000000;">1</span>
stop on runlevel <span style="color: #000000;">6</span>
&nbsp;
&nbsp;
pre-start script
    <span style="color: #666666; font-style: italic;">#make sure there is a place to write the pid file (optional):</span>
    <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>run<span style="color: #000000; font-weight: bold;">/</span>lighttpd <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null
    <span style="color: #c20cb9; font-weight: bold;">chown</span> www-data:www-data <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>run<span style="color: #000000; font-weight: bold;">/</span>lighttpd
    <span style="color: #c20cb9; font-weight: bold;">chmod</span> 0750 <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>run<span style="color: #000000; font-weight: bold;">/</span>lighttpd
end script
&nbsp;
respawn
<span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #660033;">-u</span> www-data lighttpd <span style="color: #660033;">-D</span> <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>lighttpd<span style="color: #000000; font-weight: bold;">/</span>lighttpd-infobase.conf
&nbsp;
post-stop script
    <span style="color: #666666; font-style: italic;">#remove pid file (optional)</span>
    <span style="color: #666666; font-style: italic;">#add server.pid-file = &quot;/var/run/lighttpd/lighttpd.pid&quot; to lighttpd.conf file to have it generate the pid file</span>
    <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>run<span style="color: #000000; font-weight: bold;">/</span>lighttpd<span style="color: #000000; font-weight: bold;">/</span>lighttpd.pid
end script</pre></div></div>

<p>If you want to stop lighttpd, just type <tt><strong>sudo stop OL-lighttpd</strong></tt>. You can also type <tt><strong>sudo initctl list</strong></tt> for a list of all jobs under upstart.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tikirobot.net/wp/2009/03/28/how-to-run-lighttpd-under-upstart/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Let me see&#8230; I think I can pencil you in between Ubuntu installs.</title>
		<link>http://www.tikirobot.net/wp/2007/11/12/let-me-see-i-think-i-can-pencil-you-in-between-ubuntu-installs/</link>
		<comments>http://www.tikirobot.net/wp/2007/11/12/let-me-see-i-think-i-can-pencil-you-in-between-ubuntu-installs/#comments</comments>
		<pubDate>Mon, 12 Nov 2007 08:07:00 +0000</pubDate>
		<dc:creator>rajbot</dc:creator>
				<category><![CDATA[all talk]]></category>
		<category><![CDATA[no code]]></category>
		<category><![CDATA[SystemImager]]></category>
		<category><![CDATA[TikiChart]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.tikirobot.net/wp/2007/11/12/let-me-see-i-think-i-can-pencil-you-in-between-ubuntu-installs/</guid>
		<description><![CDATA[I did two things last week: sleep, and install Ubuntu. That&#8217;s all I did. Acutally, I didn&#8217;t really sleep very much, because I was busy installing Ubuntu about 54,000 times. Here, I made a chart:]]></description>
			<content:encoded><![CDATA[<p>I did two things last week: sleep, and install Ubuntu. That&#8217;s all I did. Acutally, I didn&#8217;t really sleep very much, because I was busy installing Ubuntu about 54,000 times. Here, I made a chart:</p>
<p><img src='http://www.tikirobot.net/wp/wp-content/uploads/2007/11/ubuntuinstall.png' width='500' height='396'></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tikirobot.net/wp/2007/11/12/let-me-see-i-think-i-can-pencil-you-in-between-ubuntu-installs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Liveblogging an Ubuntu 7.10 installation</title>
		<link>http://www.tikirobot.net/wp/2007/10/25/liveblogging-an-ubuntu-710-installation/</link>
		<comments>http://www.tikirobot.net/wp/2007/10/25/liveblogging-an-ubuntu-710-installation/#comments</comments>
		<pubDate>Fri, 26 Oct 2007 00:01:41 +0000</pubDate>
		<dc:creator>rajbot</dc:creator>
				<category><![CDATA[bobslobster]]></category>
		<category><![CDATA[all talk]]></category>
		<category><![CDATA[archive]]></category>
		<category><![CDATA[no code]]></category>
		<category><![CDATA[shag]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[xeyes]]></category>

		<guid isPermaLink="false">http://www.tikirobot.net/wp/2007/10/25/liveblogging-an-ubuntu-710-installation/</guid>
		<description><![CDATA[Bob, Shag and I are trying to move our book scanning hardware to Ubuntu 7.10 &#8211; the Gutsy Gibbon. It&#8217;s a ridiculous process, and our hardware is crap. Here are some notes: chai:20 (4:20) &#8211; Started up the installer app on the live cd. Unfortuantely the screen rez is 800&#215;600, so we can&#8217;t see the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/rkumar/1751746955/" title="Photo Sharing"><img src="http://farm3.static.flickr.com/2414/1751746955_c7ca77d403.jpg" width="500" height="400" alt="Photo_102.jpg" /></a></p>
<p>Bob, Shag and I are trying to move our book scanning hardware to Ubuntu 7.10 &#8211; the Gutsy Gibbon. It&#8217;s a ridiculous process, and our hardware is crap. Here are some notes:</p>
<p><UL>
<li> chai:20 (4:20) &#8211; Started up the installer app on the live cd. Unfortuantely the screen rez is 800&#215;600, so we can&#8217;t see the important back/next/ok buttons on the bottom of the installer panel. What kind of installer requires greater than 800&#215;600 screen rez?
<li> chai:23 &#8211; Somehow, by logging the Live CD user out and fucking with the screen rez, we got the screen to display a larger screen res, but we can&#8217;t see the entire desktop on our screen. Moving the mouse around seems to pan the desktop, which would kinda work, if we could see the mouse  cursor.
<li> chai:25 &#8211; We are asked for the timezone, and San Francisco isn&#8217;t one of the available options. Los Angeles is. However, we opt to move to La Paz.
<li> chai:30 &#8211; It is now officially time for chai.
<li> chai:40 &#8211; We have found that starting a lot of xeyes processes lets us estimate where the invisible mouse cursor should be. There are fifty eyeballs on our screen
<li> chai:45 &#8211; Bob starts playing minesweeper
<li> chai:48 &#8211; Someone figures out that this version of xeyes lets us resize the window, so there is a GIANT EYEBALL staring at me
<li> chai:50 &#8211; Installation done, rebooting!
<li> Mouse works after reboot! Now to try and scan books!<br />
</UL><br />
<a href="http://www.flickr.com/photos/rkumar/1752594090/" title="Photo Sharing"><img src="http://farm3.static.flickr.com/2198/1752594090_9ae6ad4d15.jpg" width="500" height="400" alt="Photo_101.jpg" /></a></p>
<p><a href="http://www.flickr.com/photos/rkumar/1751746601/" title="Photo Sharing"><img src="http://farm3.static.flickr.com/2073/1751746601_90aac12eda.jpg" width="500" height="400" alt="Photo_10.jpg" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tikirobot.net/wp/2007/10/25/liveblogging-an-ubuntu-710-installation/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

