<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0" xml:base="http://andunix.net/_4feedburner">
  <channel>
    <title>andunix.net</title>
    <link>http://andunix.net/_4feedburner</link>
    <description />
    <language>en</language>
          <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/andunix/net" /><feedburner:info uri="andunix/net" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
    <title>DynDNS Updates without a Client</title>
    <link>http://feedproxy.google.com/~r/andunix/net/~3/2CDVxEXUknk/dyndns_updates_without_client</link>
    <description>&lt;p&gt;My new hosting provide &lt;a href='http://www.strato.de/' target='_blank'&gt;Strato&lt;/a&gt; offers DynDNS. I was searching for a DynDNS client for my &lt;a href='http://www.opensolaris.org/' target='_blank'&gt;OpenSolaris&lt;/a&gt; Home Server, but a small bash script does the job as good as any other client.&lt;/p&gt;
&lt;p&gt;&lt;div class="geshifilter"&gt;&lt;pre class="bash geshifilter-bash" style="font-family:monospace;"&gt;&lt;span style="color: #666666; font-style: italic;"&gt;#! /bin/bash&lt;/span&gt;
&amp;nbsp;
. &lt;span style="color: #800000;"&gt;${HOME}&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;.dyndns.cfg
&lt;span style="color: #007800;"&gt;DOMAINS&lt;/span&gt;=$&lt;span style="color: #7a0874; font-weight: bold;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #c20cb9; font-weight: bold;"&gt;cat&lt;/span&gt; &lt;span style="color: #800000;"&gt;${HOME}&lt;/span&gt;&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;.dyndns.domains&lt;span style="color: #7a0874; font-weight: bold;"&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #7a0874; font-weight: bold;"&gt;echo&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;&amp;quot;&lt;span style="color: #007800;"&gt;$(date '+%Y-%m-%d %H:%M')&lt;/span&gt; &lt;span style="color: #007800;"&gt;$(basename $0)&lt;/span&gt;&amp;quot;&lt;/span&gt;
&lt;span style="color: #000000; font-weight: bold;"&gt;for&lt;/span&gt; domain &lt;span style="color: #000000; font-weight: bold;"&gt;in&lt;/span&gt; &lt;span style="color: #800000;"&gt;${DOMAINS}&lt;/span&gt;; &lt;span style="color: #000000; font-weight: bold;"&gt;do&lt;/span&gt;
        &lt;span style="color: #7a0874; font-weight: bold;"&gt;echo&lt;/span&gt; &lt;span style="color: #660033;"&gt;-n&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;&amp;quot;  &lt;span style="color: #007800;"&gt;${domain}&lt;/span&gt; - &amp;quot;&lt;/span&gt;
        curl &lt;span style="color: #660033;"&gt;--silent&lt;/span&gt; &lt;span style="color: #660033;"&gt;--show-error&lt;/span&gt; &lt;span style="color: #660033;"&gt;--insecure&lt;/span&gt; &lt;span style="color: #660033;"&gt;--user&lt;/span&gt; &lt;span style="color: #800000;"&gt;${LOGIN}&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;&amp;quot;&lt;span style="color: #007800;"&gt;${UPDATE_URL}&lt;/span&gt;?hostname=&lt;span style="color: #007800;"&gt;${domain}&lt;/span&gt;&amp;quot;&lt;/span&gt;
&lt;span style="color: #000000; font-weight: bold;"&gt;done&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;First, the login credentials (the $LOGIN variable) and the server's URL ($UPDATE_URL) are read from the config file &lt;span class="geshifilter"&gt;&lt;code class="text geshifilter-text"&gt;~/.dyndns.cfg&lt;/code&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Here an example config file:&lt;/p&gt;
&lt;p&gt;&lt;div class="geshifilter"&gt;&lt;pre class="text geshifilter-text" style="font-family:monospace;"&gt;LOGIN=&amp;quot;jdoe:secret&amp;quot;
UPDATE_URL=&amp;quot;http://members.dyndns.org/nic/update&amp;quot; # DynDNS service
# UPDATE_URL=&amp;quot;https://dyndns.strato.com/nic/update&amp;quot; # Strato's DynDNS service&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;The file &lt;span class="geshifilter"&gt;&lt;code class="text geshifilter-text"&gt;.dyndns.domains&lt;/code&gt;&lt;/span&gt; contains all the domains which should be updated. They must be whitespace separated, I recomment to put one domain per line.&lt;/p&gt;
&lt;p&gt;In the for loop, &lt;span class="geshifilter"&gt;&lt;code class="text geshifilter-text"&gt;curl&lt;/code&gt;&lt;/span&gt; is used to update the domains.&lt;/p&gt;
&lt;p&gt;Currently, I use the switch &lt;span class="geshifilter"&gt;&lt;code class="text geshifilter-text"&gt;--insecure&lt;/code&gt;&lt;/span&gt; to disable the SSL certificate check. As soon a I found out how to download the server certificate and check it in the correct way I will let you know in an update.&lt;/p&gt;
&lt;p&gt;This script is part of my &lt;a href='http://bitbucket.org/andunix/scripts/' target='_blank'&gt;scripts collection&lt;/a&gt;, so you can find the latest version at &lt;a href='http://bitbucket.org/andunix/scripts/src/tip/bin/cron-dyndns-update' target='_blank'&gt;http://bitbucket.org/andunix/scripts/src/tip/bin/cron-dyndns-update&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You can find the DynDNS protocol specification at &lt;a href='http://www.dyndns.com/developers/specs/syntax.html' target='_blank'&gt;http://www.dyndns.com/developers/specs/syntax.html&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/andunix/net/~4/2CDVxEXUknk" height="1" width="1"/&gt;</description>
     <comments>http://andunix.net/blog/2010/dyndns_updates_without_client#comments</comments>
 <category domain="http://andunix.net/category/home_server">Home Server</category>
 <category domain="http://andunix.net/tag/homeserver">homeserver</category>
 <category domain="http://andunix.net/tag/opensolaris">opensolaris</category>
 <category domain="http://andunix.net/tag/script">script</category>
 <category domain="http://andunix.net/tag/scripting">scripting</category>
 <category domain="http://andunix.net/tag/sysadmin">sysadmin</category>
 <pubDate>Fri, 04 Jun 2010 18:08:33 +0000</pubDate>
 <dc:creator>andunix</dc:creator>
 <guid isPermaLink="false">179 at http://andunix.net</guid>
  <feedburner:origLink>http://andunix.net/blog/2010/dyndns_updates_without_client</feedburner:origLink></item>
  <item>
    <title>How To Create a Moveable VM with VirtualBox</title>
    <link>http://feedproxy.google.com/~r/andunix/net/~3/PY94vMbznd8/how_create_moveable_vm_virtualbox</link>
    <description>&lt;p&gt;VirtualBox works good when you use the same VMs all the time. It organizes the disk images in one directory and the configuration files in another. It kees a record of all known disk images and virtual machines.&lt;/p&gt;
&lt;p&gt;If you try to carry a VM around with you on an USB stick or want to put it on an encrypted image, then you will get trouble.&lt;/p&gt;
&lt;p&gt;First thing is, that you have to be careful when creating the disk image and use the button to select the directory for the disk image or VirtualBox will put it in the default directory.&lt;/p&gt;
&lt;p&gt;Second, you don't have an option to specify where to put the VM itself (it's a XML file). It will always be in a subdirectory under the machines directory.&lt;/p&gt;
&lt;p&gt;At last, VirtualBox will remember the VM and the associated disk image and complain when they are missing.&lt;/p&gt;
&lt;p&gt;To ease the handling of "moveable" VMs, I created a script which creates a VM and a disk image in a given directory and also creates scripts to activate and deactivate the VM.&lt;/p&gt;
&lt;h2&gt;The Script&lt;/h2&gt;
&lt;p&gt;So let's have a look at the script. I'll go thought some snippets here, but there is a link to the full script below.&lt;/p&gt;
&lt;p&gt;At the top, there are two settings which you may want to change if you use the script. The &lt;span class="geshifilter"&gt;&lt;code class="text geshifilter-text"&gt;VBOX=&lt;/code&gt;&lt;/span&gt; setting contains the full path to &lt;span class="geshifilter"&gt;&lt;code class="text geshifilter-text"&gt;VBoxManage&lt;/code&gt;&lt;/span&gt;, VirtualBox's command line tool. &lt;span class="geshifilter"&gt;&lt;code class="text geshifilter-text"&gt;SCRIPT_EXT=&lt;/code&gt;&lt;/span&gt; is the extensions for the generated scripts.&lt;/p&gt;
&lt;p&gt;&lt;div class="geshifilter"&gt;&lt;pre class="bash geshifilter-bash" style="font-family:monospace;"&gt;&lt;span style="color: #007800;"&gt;VBOX&lt;/span&gt;=&lt;span style="color: #ff0000;"&gt;&amp;quot;/usr/bin/VBoxManage&amp;quot;&lt;/span&gt;
&lt;span style="color: #007800;"&gt;SCRIPT_EXT&lt;/span&gt;=&lt;span style="color: #ff0000;"&gt;&amp;quot;command&amp;quot;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Next, there are defaults for the VMs parameters in case the user enters no value.&lt;/p&gt;
&lt;p&gt;&lt;div class="geshifilter"&gt;&lt;pre class="bash geshifilter-bash" style="font-family:monospace;"&gt;&lt;span style="color: #007800;"&gt;RAM&lt;/span&gt;=&lt;span style="color: #ff0000;"&gt;&amp;quot;512&amp;quot;&lt;/span&gt;
&lt;span style="color: #007800;"&gt;DISK_SIZE&lt;/span&gt;=&lt;span style="color: #ff0000;"&gt;&amp;quot;8196&amp;quot;&lt;/span&gt;
&lt;span style="color: #007800;"&gt;DISK_TYPE&lt;/span&gt;=&lt;span style="color: #ff0000;"&gt;&amp;quot;vdi&amp;quot;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;The script asks for the parameters and uses the defaults if no value is entered. For example, the question for the disk size:&lt;/p&gt;
&lt;p&gt;&lt;div class="geshifilter"&gt;&lt;pre class="bash geshifilter-bash" style="font-family:monospace;"&gt;&lt;span style="color: #7a0874; font-weight: bold;"&gt;echo&lt;/span&gt; &lt;span style="color: #660033;"&gt;-n&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;&amp;quot;Enter disk size in MiB [&lt;span style="color: #007800;"&gt;${DISK_SIZE}&lt;/span&gt;]: &amp;quot;&lt;/span&gt;
&lt;span style="color: #c20cb9; font-weight: bold;"&gt;read&lt;/span&gt; a
&lt;span style="color: #007800;"&gt;DISK_SIZE&lt;/span&gt;=&lt;span style="color: #800000;"&gt;${a:-${DISK_SIZE}&lt;/span&gt;&lt;span style="color: #7a0874; font-weight: bold;"&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;The main part. The base directory, the VM and the disk image are created. The VM is configured according to the parameters above.&lt;/p&gt;
&lt;p&gt;&lt;div class="geshifilter"&gt;&lt;pre class="bash geshifilter-bash" style="font-family:monospace;"&gt;&lt;span style="color: #c20cb9; font-weight: bold;"&gt;mkdir&lt;/span&gt; &lt;span style="color: #660033;"&gt;-p&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;&amp;quot;&lt;span style="color: #007800;"&gt;${VM_DIR}&lt;/span&gt;&amp;quot;&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #800000;"&gt;${VBOX}&lt;/span&gt; &lt;span style="color: #660033;"&gt;-q&lt;/span&gt; createvm &lt;span style="color: #660033;"&gt;--name&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;&amp;quot;&lt;span style="color: #007800;"&gt;${VM_NAME}&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span style="color: #660033;"&gt;--basefolder&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;&amp;quot;&lt;span style="color: #007800;"&gt;${BASE_DIR}&lt;/span&gt;&amp;quot;&lt;/span&gt;
&lt;span style="color: #800000;"&gt;${VBOX}&lt;/span&gt; &lt;span style="color: #660033;"&gt;-q&lt;/span&gt; registervm &lt;span style="color: #ff0000;"&gt;&amp;quot;&lt;span style="color: #007800;"&gt;${VM_DIR}&lt;/span&gt;/&lt;span style="color: #007800;"&gt;${VM_NAME}&lt;/span&gt;.xml&amp;quot;&lt;/span&gt;
&lt;span style="color: #800000;"&gt;${VBOX}&lt;/span&gt; &lt;span style="color: #660033;"&gt;-q&lt;/span&gt; storagectl &lt;span style="color: #ff0000;"&gt;&amp;quot;&lt;span style="color: #007800;"&gt;${VM_NAME}&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span style="color: #660033;"&gt;--name&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;&amp;quot;IDE Controller&amp;quot;&lt;/span&gt; &lt;span style="color: #660033;"&gt;--add&lt;/span&gt; ide
&lt;span style="color: #800000;"&gt;${VBOX}&lt;/span&gt; &lt;span style="color: #660033;"&gt;-q&lt;/span&gt; createhd &lt;span style="color: #660033;"&gt;--filename&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;&amp;quot;&lt;span style="color: #007800;"&gt;${VM_DIR}&lt;/span&gt;/&lt;span style="color: #007800;"&gt;${VM_NAME}&lt;/span&gt;.vmdk&amp;quot;&lt;/span&gt; &lt;span style="color: #660033;"&gt;--size&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;&amp;quot;&lt;span style="color: #007800;"&gt;${DISK_SIZE}&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span style="color: #660033;"&gt;--format&lt;/span&gt; VMDK
&lt;span style="color: #800000;"&gt;${VBOX}&lt;/span&gt; &lt;span style="color: #660033;"&gt;-q&lt;/span&gt; modifyvm &lt;span style="color: #ff0000;"&gt;&amp;quot;&lt;span style="color: #007800;"&gt;${VM_NAME}&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span style="color: #660033;"&gt;--hda&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;&amp;quot;&lt;span style="color: #007800;"&gt;${VM_DIR}&lt;/span&gt;/&lt;span style="color: #007800;"&gt;${VM_NAME}&lt;/span&gt;.vmdk&amp;quot;&lt;/span&gt;
&lt;span style="color: #800000;"&gt;${VBOX}&lt;/span&gt; &lt;span style="color: #660033;"&gt;-q&lt;/span&gt; storageattach &lt;span style="color: #ff0000;"&gt;&amp;quot;&lt;span style="color: #007800;"&gt;${VM_NAME}&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span style="color: #660033;"&gt;--storagectl&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;&amp;quot;IDE Controller&amp;quot;&lt;/span&gt; &lt;span style="color: #660033;"&gt;--port&lt;/span&gt; &lt;span style="color: #000000;"&gt;0&lt;/span&gt; &lt;span style="color: #660033;"&gt;--device&lt;/span&gt; &lt;span style="color: #000000;"&gt;1&lt;/span&gt; &lt;span style="color: #660033;"&gt;--type&lt;/span&gt; dvddrive &lt;span style="color: #660033;"&gt;--medium&lt;/span&gt; emptydrive
&amp;nbsp;
&lt;span style="color: #7a0874; font-weight: bold;"&gt;test&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;!&lt;/span&gt; &lt;span style="color: #660033;"&gt;-z&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;&amp;quot;&lt;span style="color: #007800;"&gt;${RAM}&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span style="color: #800000;"&gt;${VBOX}&lt;/span&gt; &lt;span style="color: #660033;"&gt;-q&lt;/span&gt; modifyvm &lt;span style="color: #ff0000;"&gt;&amp;quot;&lt;span style="color: #007800;"&gt;${VM_NAME}&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span style="color: #660033;"&gt;--memory&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;&amp;quot;&lt;span style="color: #007800;"&gt;${RAM}&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Finally, the scripts are created. There are three of them: activate, boot (same as activate, just with an additional boot command) and deactivate. The variables are evaluated while creating, so the following code will create the activation script below.&lt;/p&gt;
&lt;p&gt;Code:&lt;br /&gt;
&lt;div class="geshifilter"&gt;&lt;pre class="bash geshifilter-bash" style="font-family:monospace;"&gt;&lt;span style="color: #c20cb9; font-weight: bold;"&gt;cat&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;&amp;lt;&amp;lt;&lt;/span&gt; __SCRIPT__ &lt;span style="color: #000000; font-weight: bold;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;&amp;quot;&lt;span style="color: #007800;"&gt;${VM_DIR}&lt;/span&gt;/activate.&lt;span style="color: #007800;"&gt;${SCRIPT_EXT}&lt;/span&gt;&amp;quot;&lt;/span&gt;
&lt;span style="color: #666666; font-style: italic;"&gt;#! /bin/sh&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #800000;"&gt;${VBOX}&lt;/span&gt; &lt;span style="color: #660033;"&gt;-q&lt;/span&gt; registervm &lt;span style="color: #ff0000;"&gt;&amp;quot;&lt;span style="color: #007800;"&gt;${VM_DIR}&lt;/span&gt;/&lt;span style="color: #007800;"&gt;${VM_NAME}&lt;/span&gt;.xml&amp;quot;&lt;/span&gt;
&lt;span style="color: #800000;"&gt;${VBOX}&lt;/span&gt; &lt;span style="color: #660033;"&gt;-q&lt;/span&gt; modifyvm &lt;span style="color: #ff0000;"&gt;&amp;quot;&lt;span style="color: #007800;"&gt;${VM_NAME}&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span style="color: #660033;"&gt;--hda&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;&amp;quot;&lt;span style="color: #007800;"&gt;${VM_DIR}&lt;/span&gt;/&lt;span style="color: #007800;"&gt;${VM_NAME}&lt;/span&gt;.vmdk&amp;quot;&lt;/span&gt;
&lt;span style="color: #800000;"&gt;${VBOX}&lt;/span&gt; &lt;span style="color: #660033;"&gt;-q&lt;/span&gt; storageattach &lt;span style="color: #ff0000;"&gt;&amp;quot;&lt;span style="color: #007800;"&gt;${VM_NAME}&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span style="color: #660033;"&gt;--storagectl&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;&amp;quot;IDE Controller&amp;quot;&lt;/span&gt; &lt;span style="color: #660033;"&gt;--port&lt;/span&gt; &lt;span style="color: #000000;"&gt;0&lt;/span&gt; &lt;span style="color: #660033;"&gt;--device&lt;/span&gt; &lt;span style="color: #000000;"&gt;1&lt;/span&gt; &lt;span style="color: #660033;"&gt;--type&lt;/span&gt; dvddrive &lt;span style="color: #660033;"&gt;--medium&lt;/span&gt; emptydrive
__SCRIPT__&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Result:&lt;br /&gt;
&lt;div class="geshifilter"&gt;&lt;pre class="bash geshifilter-bash" style="font-family:monospace;"&gt;&lt;span style="color: #666666; font-style: italic;"&gt;#! /bin/sh&lt;/span&gt;
&amp;nbsp;
&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;usr&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;bin&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;VBoxManage registervm &lt;span style="color: #ff0000;"&gt;&amp;quot;/local/temp-vm/temp-vm.xml&amp;quot;&lt;/span&gt;
&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;usr&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;bin&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;VBoxManage modifyvm &lt;span style="color: #ff0000;"&gt;&amp;quot;temp-vm&amp;quot;&lt;/span&gt; &lt;span style="color: #660033;"&gt;--hda&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;&amp;quot;/local/temp-vm/temp-vm.vmdk&amp;quot;&lt;/span&gt;
&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;usr&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;bin&lt;span style="color: #000000; font-weight: bold;"&gt;/&lt;/span&gt;VBoxManage &lt;span style="color: #660033;"&gt;-q&lt;/span&gt; storageattach &lt;span style="color: #ff0000;"&gt;&amp;quot;temp-vm&amp;quot;&lt;/span&gt; &lt;span style="color: #660033;"&gt;--storagectl&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;&amp;quot;IDE Controller&amp;quot;&lt;/span&gt; &lt;span style="color: #660033;"&gt;--port&lt;/span&gt; &lt;span style="color: #000000;"&gt;0&lt;/span&gt; &lt;span style="color: #660033;"&gt;--device&lt;/span&gt; &lt;span style="color: #000000;"&gt;1&lt;/span&gt; &lt;span style="color: #660033;"&gt;--type&lt;/span&gt; dvddrive &lt;span style="color: #660033;"&gt;--medium&lt;/span&gt; emptydrive&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;You can have a look at the code either in &lt;a href='http://bitbucket.org/andunix/scripts/src/be7b69b23a10/bin/vbox-create-moveable-vm' target='_blank'&gt;the version as of this article&lt;/a&gt; or in the &lt;a href='http://bitbucket.org/andunix/scripts/src/tip/bin/vbox-create-moveable-vm' target='_blank'&gt;latest version&lt;/a&gt;. Please keep in mind that not all written here may be true for the later as the script will be improved in the future.&lt;/p&gt;
&lt;h2&gt;The Future&lt;/h2&gt;
&lt;p&gt;There are some things, which not yet work as I want them to.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The VM must not have snapshots.&lt;/li&gt;
&lt;li&gt;You have to shut down the VM. If you suspend it, it won't detach.&lt;/li&gt;
&lt;li&gt;As the DVD drive is removed and recreated, the VM won't remember the mounted image.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you found this script useful, please let me know (you can use the &lt;a href="/contact"&gt;contact form&lt;/a&gt; or leave a comment). You can also &lt;a href='http://feeds.feedburner.com/andunix/net' target='_blank'&gt;subscribe the further blog postings&lt;/a&gt; of follow the changes to &lt;a href='http://bitbucket.org/andunix/scripts/overview' target='_blank'&gt;my scripts collection on bitbucket.org&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/andunix/net/~4/PY94vMbznd8" height="1" width="1"/&gt;</description>
     <comments>http://andunix.net/blog/2010/how_create_moveable_vm_virtualbox#comments</comments>
 <category domain="http://andunix.net/tag/cli">cli</category>
 <category domain="http://andunix.net/category/scripting">Scripting</category>
 <category domain="http://andunix.net/tag/scripting">scripting</category>
 <category domain="http://andunix.net/tag/shell">shell</category>
 <category domain="http://andunix.net/tag/virtualbox">virtualbox</category>
 <category domain="http://andunix.net/tag/virtualization">virtualization</category>
 <pubDate>Mon, 17 May 2010 08:55:36 +0000</pubDate>
 <dc:creator>andunix</dc:creator>
 <guid isPermaLink="false">102 at http://andunix.net</guid>
  <feedburner:origLink>http://andunix.net/blog/2010/how_create_moveable_vm_virtualbox</feedburner:origLink></item>
  <item>
    <title>Make your Mac feel at Home</title>
    <link>http://feedproxy.google.com/~r/andunix/net/~3/WkifV5IapHU/make_your_mac_feel_home</link>
    <description>&lt;p&gt;A small snippet from one of my scripts which tests whether your Mac is in the given (home) WLAN.&lt;/p&gt;
&lt;p&gt;&lt;div class="geshifilter"&gt;&lt;pre class="bash geshifilter-bash" style="font-family:monospace;"&gt;&lt;span style="color: #666666; font-style: italic;"&gt;#&lt;/span&gt;
&lt;span style="color: #666666; font-style: italic;"&gt;# Path to 'airport' executeable, as of Mac OS X 10.5.&lt;/span&gt;
&lt;span style="color: #007800;"&gt;AIRPORT&lt;/span&gt;=&lt;span style="color: #ff0000;"&gt;&amp;quot;/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport&amp;quot;&lt;/span&gt;
&lt;span style="color: #666666; font-style: italic;"&gt;#&lt;/span&gt;
&lt;span style="color: #666666; font-style: italic;"&gt;# Set this to your Home WLAN SSID (name):&lt;/span&gt;
&lt;span style="color: #007800;"&gt;HOMESSID&lt;/span&gt;=&lt;span style="color: #ff0000;"&gt;&amp;quot;mycastle&amp;quot;&lt;/span&gt;
&lt;span style="color: #666666; font-style: italic;"&gt;#&lt;/span&gt;
&lt;span style="color: #666666; font-style: italic;"&gt;# Get SSID info from 'airport' and search for $HOMESSID&lt;/span&gt;
&lt;span style="color: #007800;"&gt;SSID&lt;/span&gt;=$&lt;span style="color: #7a0874; font-weight: bold;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #800000;"&gt;${AIRPORT}&lt;/span&gt; &lt;span style="color: #660033;"&gt;--getinfo&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;|&lt;/span&gt; &lt;span style="color: #c20cb9; font-weight: bold;"&gt;grep&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;' SSID:'&lt;/span&gt;&lt;span style="color: #7a0874; font-weight: bold;"&gt;&amp;#41;&lt;/span&gt;
&lt;span style="color: #007800;"&gt;SSID&lt;/span&gt;=$&lt;span style="color: #7a0874; font-weight: bold;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #7a0874; font-weight: bold;"&gt;echo&lt;/span&gt; &lt;span style="color: #800000;"&gt;${SSID}&lt;/span&gt; &lt;span style="color: #000000; font-weight: bold;"&gt;|&lt;/span&gt; &lt;span style="color: #c20cb9; font-weight: bold;"&gt;grep&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;&amp;quot;^SSID: &lt;span style="color: #007800;"&gt;${HOMESSID}&lt;/span&gt;&lt;span style="color: #000099; font-weight: bold;"&gt;\$&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #7a0874; font-weight: bold;"&gt;&amp;#41;&lt;/span&gt;
&lt;span style="color: #666666; font-style: italic;"&gt;#&lt;/span&gt;
&lt;span style="color: #666666; font-style: italic;"&gt;# Branch depending on grep's return code.&lt;/span&gt;
&lt;span style="color: #000000; font-weight: bold;"&gt;if&lt;/span&gt; &lt;span style="color: #7a0874; font-weight: bold;"&gt;&amp;#91;&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;&amp;quot;$?&amp;quot;&lt;/span&gt; == &lt;span style="color: #ff0000;"&gt;&amp;quot;0&amp;quot;&lt;/span&gt; &lt;span style="color: #7a0874; font-weight: bold;"&gt;&amp;#93;&lt;/span&gt;; &lt;span style="color: #000000; font-weight: bold;"&gt;then&lt;/span&gt;
	&lt;span style="color: #666666; font-style: italic;"&gt;# in home wlan&lt;/span&gt;
	&lt;span style="color: #7a0874; font-weight: bold;"&gt;echo&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;&amp;quot;home sweet home...&amp;quot;&lt;/span&gt;
&lt;span style="color: #000000; font-weight: bold;"&gt;else&lt;/span&gt;
	&lt;span style="color: #666666; font-style: italic;"&gt;# not at home&lt;/span&gt;
	&lt;span style="color: #7a0874; font-weight: bold;"&gt;echo&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;&amp;quot;on the road again...&amp;quot;&lt;/span&gt;
&lt;span style="color: #000000; font-weight: bold;"&gt;fi&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;To use this code, set the HOMESSID to your SSID (the name of the wireless network) and replace the two &lt;span class="geshifilter"&gt;&lt;code class="text geshifilter-text"&gt;echo&lt;/code&gt;&lt;/span&gt; lines with your code.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/andunix/net/~4/WkifV5IapHU" height="1" width="1"/&gt;</description>
     <comments>http://andunix.net/blog/2010/make_your_mac_feel_home#comments</comments>
 <category domain="http://andunix.net/tag/mac">mac</category>
 <category domain="http://andunix.net/tag/macosx">macosx</category>
 <category domain="http://andunix.net/category/scripting">Scripting</category>
 <category domain="http://andunix.net/tag/wlan">wlan</category>
 <pubDate>Mon, 03 May 2010 15:24:20 +0000</pubDate>
 <dc:creator>andunix</dc:creator>
 <guid isPermaLink="false">78 at http://andunix.net</guid>
  <feedburner:origLink>http://andunix.net/blog/2010/make_your_mac_feel_home</feedburner:origLink></item>
  <item>
    <title>Set PHP Variables in .htaccess Files</title>
    <link>http://feedproxy.google.com/~r/andunix/net/~3/tvktMsVccfc/set_php_variables_htaccess_files</link>
    <description>&lt;p&gt;If your PHP scripts run longer than the maximum execution time set by your webhoster, then you will see a message like this:&lt;/p&gt;
&lt;p&gt;&lt;div class="geshifilter"&gt;&lt;pre class="text geshifilter-text" style="font-family:monospace;"&gt;Fatal error: Maximum execution time of 30 seconds exceeded in ...&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;To override the default for your webspace, you can use the &lt;span class="geshifilter"&gt;&lt;code class="text geshifilter-text"&gt;php_value&lt;/code&gt;&lt;/span&gt; directive in a &lt;span class="geshifilter"&gt;&lt;code class="text geshifilter-text"&gt;.htaccess&lt;/code&gt;&lt;/span&gt; file.&lt;/p&gt;
&lt;p&gt;To set the value to "0", which means no limit, add this line:&lt;/p&gt;
&lt;p&gt;&lt;div class="geshifilter"&gt;&lt;pre class="text geshifilter-text" style="font-family:monospace;"&gt;php_value max_execution_time 0&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;I suggest to either set it to unlimited, run the long running script and then comment it out or set it to some reasonable value like 120 or 300, depending on the time the script usually needs.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/andunix/net/~4/tvktMsVccfc" height="1" width="1"/&gt;</description>
     <comments>http://andunix.net/blog/2010/set_php_variables_htaccess_files#comments</comments>
 <category domain="http://andunix.net/tag/apache">apache</category>
 <category domain="http://andunix.net/category/blogging">Blogging</category>
 <category domain="http://andunix.net/tag/php">php</category>
 <category domain="http://andunix.net/tag/webhosting">webhosting</category>
 <pubDate>Thu, 29 Apr 2010 15:07:43 +0000</pubDate>
 <dc:creator>andunix</dc:creator>
 <guid isPermaLink="false">76 at http://andunix.net</guid>
  <feedburner:origLink>http://andunix.net/blog/2010/set_php_variables_htaccess_files</feedburner:origLink></item>
  <item>
    <title>Memory Usage of a Solaris Container (Zone)</title>
    <link>http://feedproxy.google.com/~r/andunix/net/~3/o9OvwuKNTR4/memory_usage_solaris_container_zone</link>
    <description>&lt;p&gt;Last week one of my servers ran out of RAM and Swap. Shame on me for not monitoring that, but it's now.&lt;/p&gt;
&lt;p&gt;As the server is running several zones, my first question was: Which zone is eating up my RAM? So, here are the commands I used.&lt;/p&gt;
&lt;h2&gt;Part 1: Find the Zone&lt;/h2&gt;
&lt;p&gt;To see the memory usage of the running zones:&lt;/p&gt;
&lt;p&gt;&lt;div class="geshifilter"&gt;&lt;pre class="text geshifilter-text" style="font-family:monospace;"&gt;prstat -Z&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;From the &lt;span class="geshifilter"&gt;&lt;code class="text geshifilter-text"&gt;&lt;a href='http://docs.sun.com/app/docs/doc/819-2240/prstat-1m?a=view' target='_blank'&gt;prstat(1M)&lt;/a&gt;&lt;/code&gt;&lt;/span&gt; man page:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class="geshifilter"&gt;&lt;code class="text geshifilter-text"&gt;-Z&lt;/code&gt;&lt;/span&gt; Report information about processes and zones. In this mode, &lt;span class="geshifilter"&gt;&lt;code class="text geshifilter-text"&gt;prstat&lt;/code&gt;&lt;/span&gt; displays separate reports about processes and zones at the same time.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Part 2: Find the Process(es) in the Zone&lt;/h2&gt;
&lt;p&gt;To see which processes use the most RAM in the zone, use one of these commands:&lt;/p&gt;
&lt;p&gt;&lt;div class="geshifilter"&gt;&lt;pre class="text geshifilter-text" style="font-family:monospace;"&gt;prstat -z zone -s rss
prstat -z zone -s size&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;From the &lt;span class="geshifilter"&gt;&lt;code class="text geshifilter-text"&gt;&lt;a href='http://docs.sun.com/app/docs/doc/819-2240/prstat-1m?a=view' target='_blank'&gt;prstat(1M)&lt;/a&gt;&lt;/code&gt;&lt;/span&gt; man page:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class="geshifilter"&gt;&lt;code class="text geshifilter-text"&gt;-z zoneidlist&lt;/code&gt;&lt;/span&gt; Report only processes or LWPs whose zone ID is in the given list. Each zone ID can be specified as either a zone name or a numerical zone ID. See &lt;a href='http://docs.sun.com/app/docs/doc/819-2252/zones-5?a=view' target='_blank'&gt;zones(5)&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;span class="geshifilter"&gt;&lt;code class="text geshifilter-text"&gt;-s key&lt;/code&gt;&lt;/span&gt; Sort output lines (that is, processes, lwps, or users) by key in descending order. Only one key can be used as an argument.
&lt;ul&gt;
&lt;li&gt;&lt;span class="geshifilter"&gt;&lt;code class="text geshifilter-text"&gt;rss&lt;/code&gt;&lt;/span&gt; Sort by resident set size.&lt;/li&gt;
&lt;li&gt;&lt;span class="geshifilter"&gt;&lt;code class="text geshifilter-text"&gt;size&lt;/code&gt;&lt;/span&gt; Sort by size of process image.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;p&gt;Note the upper case &lt;span class="geshifilter"&gt;&lt;code class="text geshifilter-text"&gt;-Z&lt;/code&gt;&lt;/span&gt; in the first an the lower case &lt;span class="geshifilter"&gt;&lt;code class="text geshifilter-text"&gt;-z&lt;/code&gt;&lt;/span&gt; in the second command.&lt;/p&gt;
&lt;p&gt;For more information about &lt;span class="geshifilter"&gt;&lt;code class="text geshifilter-text"&gt;prstat&lt;/code&gt;&lt;/span&gt;, see the manual &lt;span class="geshifilter"&gt;&lt;code class="text geshifilter-text"&gt;&lt;a href='http://docs.sun.com/app/docs/doc/819-2240/prstat-1m?a=view' target='_blank'&gt;prstat(1M)&lt;/a&gt;&lt;/code&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/andunix/net/~4/o9OvwuKNTR4" height="1" width="1"/&gt;</description>
     <comments>http://andunix.net/blog/2010/memory_usage_solaris_container_zone#comments</comments>
 <category domain="http://andunix.net/tag/opensolaris">opensolaris</category>
 <category domain="http://andunix.net/category/solaris">Solaris</category>
 <category domain="http://andunix.net/tag/solaris">solaris</category>
 <category domain="http://andunix.net/tag/solaris_container">solaris_container</category>
 <category domain="http://andunix.net/tag/sysadmin">sysadmin</category>
 <category domain="http://andunix.net/tag/zone">zone</category>
 <pubDate>Wed, 21 Apr 2010 09:17:09 +0000</pubDate>
 <dc:creator>andunix</dc:creator>
 <guid isPermaLink="false">75 at http://andunix.net</guid>
  <feedburner:origLink>http://andunix.net/blog/2010/memory_usage_solaris_container_zone</feedburner:origLink></item>
  <item>
    <title>Drupal: Reverse Proxy</title>
    <link>http://feedproxy.google.com/~r/andunix/net/~3/xrTOx_O7dwY/drupal_reverse_proxy</link>
    <description>&lt;p&gt;&lt;a href="http://drupal.org/user/280026"&gt;skybow&lt;/a&gt; wrote the very helpful article "&lt;a href="http://drupal.org/node/339552"&gt;Drupal via HTTPS/SSL Proxy Server (shared certificates)&lt;/a&gt;".&lt;br /&gt;
While following his advice, I found some improvements.&lt;/p&gt;
&lt;p&gt;To reduce the amount of editing and to increate the reusability, I substituted &lt;span class="geshifilter"&gt;&lt;code class="text geshifilter-text"&gt;www.example.com&lt;/code&gt;&lt;/span&gt; with &lt;span class="geshifilter"&gt;&lt;code class="text geshifilter-text"&gt;$_SERVER['SERVER_NAME']&lt;/code&gt;&lt;/span&gt; and &lt;span class="geshifilter"&gt;&lt;code class="text geshifilter-text"&gt;ssl.proxy.org&lt;/code&gt;&lt;/span&gt; with &lt;span class="geshifilter"&gt;&lt;code class="text geshifilter-text"&gt;$_SERVER['HTTP_X_FORWARDED_HOST']&lt;/code&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Additionally, I added the line &lt;span class="geshifilter"&gt;&lt;code class="text geshifilter-text"&gt;ini_set('session.cookie_path', '/'.$_SERVER['SERVER_NAME'].'/');&lt;/code&gt;&lt;/span&gt; to limit the cookies to the path, which is associated with the host.&lt;/p&gt;
&lt;p&gt;That the cookie will bei set for the path &lt;span class="geshifilter"&gt;&lt;code class="text geshifilter-text"&gt;/andunix.net/&lt;/code&gt;&lt;/span&gt; insted of the root of the reverse proxy.&lt;/p&gt;
&lt;p&gt;This improves security, as other hosts, using the same reverse proxy, won't see the cookie and also enables mutliple logins, if using multiple domain names for one installation.&lt;/p&gt;
&lt;p&gt;It has also a nice side effect: I separated my normal editor account from the admin account, so that my normal account has not all the rights.&lt;br /&gt;
If I want to log in with both accounts at the same time, I can do this using different domains.&lt;/p&gt;
&lt;p&gt;&lt;div class="geshifilter"&gt;&lt;pre class="php geshifilter-php" style="font-family:monospace;"&gt;&lt;span style="color: #000088;"&gt;$request_type&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$_SERVER&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#91;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'HTTP_X_FORWARDED_HOST'&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#93;&lt;/span&gt; &lt;span style="color: #339933;"&gt;==&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;'ssl.webpack.de'&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt; ? &lt;span style="color: #0000ff;"&gt;'SSL'&lt;/span&gt; &lt;span style="color: #339933;"&gt;:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;'NONSSL'&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;
&lt;span style="color: #b1b100;"&gt;if&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$request_type&lt;/span&gt; &lt;span style="color: #339933;"&gt;!=&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;quot;SSL&amp;quot;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#123;&lt;/span&gt;
  &lt;span style="color: #000088;"&gt;$base_url&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;'http://'&lt;/span&gt; &lt;span style="color: #339933;"&gt;.&lt;/span&gt; &lt;span style="color: #000088;"&gt;$_SERVER&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#91;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'SERVER_NAME'&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#93;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;  &lt;span style="color: #666666; font-style: italic;"&gt;// NO trailing slash!&lt;/span&gt;
  &lt;span style="color: #000088;"&gt;$cookie_domain&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #000088;"&gt;$_SERVER&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#91;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'SERVER_NAME'&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#93;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;
&lt;span style="color: #009900;"&gt;&amp;#125;&lt;/span&gt; &lt;span style="color: #b1b100;"&gt;else&lt;/span&gt; &lt;span style="color: #009900;"&gt;&amp;#123;&lt;/span&gt;
  &lt;span style="color: #000088;"&gt;$base_url&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;'https://'&lt;/span&gt; &lt;span style="color: #339933;"&gt;.&lt;/span&gt; &lt;span style="color: #000088;"&gt;$_SERVER&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#91;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'HTTP_X_FORWARDED_HOST'&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#93;&lt;/span&gt; &lt;span style="color: #339933;"&gt;.&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;'/'&lt;/span&gt; &lt;span style="color: #339933;"&gt;.&lt;/span&gt; &lt;span style="color: #000088;"&gt;$_SERVER&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#91;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'SERVER_NAME'&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#93;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;  &lt;span style="color: #666666; font-style: italic;"&gt;// NO trailing slash!&lt;/span&gt;
  &lt;span style="color: #000088;"&gt;$cookie_domain&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #000088;"&gt;$_SERVER&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#91;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'HTTP_X_FORWARDED_HOST'&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#93;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;
  &lt;a href="http://www.php.net/ini_set"&gt;&lt;span style="color: #990000;"&gt;ini_set&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'session.cookie_path'&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;'/'&lt;/span&gt;&lt;span style="color: #339933;"&gt;.&lt;/span&gt;&lt;span style="color: #000088;"&gt;$_SERVER&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#91;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'SERVER_NAME'&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#93;&lt;/span&gt;&lt;span style="color: #339933;"&gt;.&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'/'&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000088;"&gt;$_SERVER&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#91;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'HTTPS'&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#93;&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;'on'&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000088;"&gt;$_SERVER&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#91;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'REQUEST_URI'&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#93;&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;'/'&lt;/span&gt; &lt;span style="color: #339933;"&gt;.&lt;/span&gt; &lt;span style="color: #000088;"&gt;$_SERVER&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#91;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'SERVER_NAME'&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#93;&lt;/span&gt; &lt;span style="color: #339933;"&gt;.&lt;/span&gt; &lt;span style="color: #000088;"&gt;$_SERVER&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#91;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'REQUEST_URI'&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#93;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;
  &lt;span style="color: #000088;"&gt;$conf&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&lt;/span&gt; &lt;a href="http://www.php.net/array"&gt;&lt;span style="color: #990000;"&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;
    &lt;span style="color: #0000ff;"&gt;'reverse_proxy'&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color: #009900; font-weight: bold;"&gt;TRUE&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;
    &lt;span style="color: #0000ff;"&gt;'reverse_proxy_addresses'&lt;/span&gt; &lt;span style="color: #339933;"&gt;=&amp;gt;&lt;/span&gt; &lt;a href="http://www.php.net/array"&gt;&lt;span style="color: #990000;"&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #009900;"&gt;&amp;#40;&lt;/span&gt;&lt;span style="color: #000088;"&gt;$_SERVER&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#91;&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;'REMOTE_ADDR'&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#93;&lt;/span&gt;&lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;,&lt;/span&gt;
  &lt;span style="color: #009900;"&gt;&amp;#41;&lt;/span&gt;&lt;span style="color: #339933;"&gt;;&lt;/span&gt;
&lt;span style="color: #009900;"&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/andunix/net/~4/xrTOx_O7dwY" height="1" width="1"/&gt;</description>
     <comments>http://andunix.net/blog/2010/drupal_reverse_proxy#comments</comments>
 <category domain="http://andunix.net/tag/blogging">blogging</category>
 <category domain="http://andunix.net/category/blogging">Blogging</category>
 <category domain="http://andunix.net/tag/drupal">drupal</category>
 <category domain="http://andunix.net/tag/php">php</category>
 <pubDate>Tue, 16 Mar 2010 17:00:34 +0000</pubDate>
 <dc:creator>andunix</dc:creator>
 <guid isPermaLink="false">69 at http://andunix.net</guid>
  <feedburner:origLink>http://andunix.net/blog/2010/drupal_reverse_proxy</feedburner:origLink></item>
  <item>
    <title>Home Server Goals</title>
    <link>http://feedproxy.google.com/~r/andunix/net/~3/4If6SkIDl7s/home_server_goals</link>
    <description>&lt;p&gt;As Constantin &lt;a href="http://constantin.glez.de/content/seven-useful-zfs-home-server-tips"&gt;suggested&lt;/a&gt;, here is a list of services, which my &lt;a href="/project/home-server"&gt;home server&lt;/a&gt; should provide:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Personal Video Recorder:&lt;/strong&gt; I'm using the EyeTV Hard- and Software from &lt;a href="http://www.elgato.com/"&gt;Elgato&lt;/a&gt; to record, cut and archive TV broadcasts.
&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Secure File Archive / Backup:&lt;/strong&gt; I want my digital camera photos and other precious files to be stored at serveral places and to be protected with checksums.
&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A/V Media Server:&lt;/strong&gt; I want to store my MP3 files and the videos from the above PVR to be stored an be served to clients in the local LAN but not to the Internet.
&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Web Hosting:&lt;/strong&gt; I want to run web application at home. Usually, I'm hosting my webapps at Host Europe, but there are some apps which I can't or don't want to host there. This includes PHP and JEE applications with MySQL as database.
&lt;/li&gt;&lt;li&gt;&lt;strong&gt;LAN Gateway:&lt;/strong&gt; I want to sercurely log into the LAN via SSH and transfer files from and to the server.
&lt;/li&gt;&lt;li&gt;I had also a "&lt;strong&gt;OpenSolaris Sandbox&lt;/strong&gt;" on this list, but I think that one is served bettes as a &lt;a href="http://www.virtualbox.org/"&gt;VirtualBox&lt;/a&gt; on my Laptop than on my home server.
&lt;/li&gt;&lt;li&gt;&lt;strong&gt;to be continued...:&lt;/strong&gt; There will be more requirements in the future, like hosting my own Jabber server.
&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;The server will continue to run Mac OS X and OpenSolaris, as the first goal on the above list requires Mac OS X and I haven't found an acceptable PVR solution for OpenSolaris yet. This is currently done using an Mac mini with Mac OS X and running an virtualized OpenSolaris on top of it. In the future, there may be two distinct servers due to some limitations of this constellation (e.g. having to stop the OpenSolaris server to install Mac OS X patches).&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/andunix/net/~4/4If6SkIDl7s" height="1" width="1"/&gt;</description>
     <comments>http://andunix.net/blog/2010/home_server_goals#comments</comments>
 <category domain="http://andunix.net/tag/backup">backup</category>
 <category domain="http://andunix.net/category/home_server">Home Server</category>
 <category domain="http://andunix.net/tag/homeserver">homeserver</category>
 <category domain="http://andunix.net/tag/java">java</category>
 <category domain="http://andunix.net/tag/macosx">macosx</category>
 <category domain="http://andunix.net/tag/mediaserver">mediaserver</category>
 <category domain="http://andunix.net/tag/mysql">mysql</category>
 <category domain="http://andunix.net/tag/opensolaris">opensolaris</category>
 <category domain="http://andunix.net/tag/php">php</category>
 <category domain="http://andunix.net/tag/ssh">ssh</category>
 <category domain="http://andunix.net/tag/virtualbox">virtualbox</category>
 <category domain="http://andunix.net/tag/webapp">webapp</category>
 <pubDate>Tue, 02 Mar 2010 15:41:41 +0000</pubDate>
 <dc:creator>andunix</dc:creator>
 <guid isPermaLink="false">68 at http://andunix.net</guid>
  <feedburner:origLink>http://andunix.net/blog/2010/home_server_goals</feedburner:origLink></item>
  <item>
    <title>Hello Drupal</title>
    <link>http://feedproxy.google.com/~r/andunix/net/~3/R300CJiV6Cw/welcome</link>
    <description>&lt;p&gt;Some time ago, I decided to migrate my blog from &lt;a href='http://www.dokuwiki.org/' target='_blank'&gt;DokuWiki&lt;/a&gt; to &lt;a href='http://drupal.org/' target='_blank'&gt;Drupal&lt;/a&gt;. Blogging with DokuWiki was OK using the plugins from the &lt;a href='http://dokuwiki.foosel.org/blogsuite/index.php' target='_blank'&gt;DokuWiki Blogsuite BundleHub&lt;/a&gt;, but Drupal has some advantages.&lt;/p&gt;
&lt;p&gt;It's always fascinating to get into a new technology. After using misc. wiki systems and Wordpress, I wanted to try a content management system. I had a quick look into Drupal, Joomla and Silverstripe, and then decided to go with Drupal.&lt;/p&gt;
&lt;p&gt;One very interesting part of Drupal is the &lt;a href='http://drupal.org/project/cck' target='_blank'&gt;Content Construction Kit (CCK)&lt;/a&gt;. This was also the main reason to choose Drupal. I've already set up my Projects a special content nodes and thinking about doing the same for tasks and bookmarks.&lt;/p&gt;
&lt;p&gt;The power of the CCK shows in the Blogroll channel in the sidebar. I set up a "Friend" content type and gave it attributes like blog URL and Twitter name. The &lt;a href='http://drupal.org/project/views' target='_blank'&gt;Views&lt;/a&gt; module rendes the list of friends as a nice list in the sidebar. The credits for this solution go to &lt;a href='http://constantin.glez.de/' target='_blank'&gt;Constantin Gonzalez&lt;/a&gt; which implemented this cool feature on his blog first.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/andunix/net/~4/R300CJiV6Cw" height="1" width="1"/&gt;</description>
     <comments>http://andunix.net/blog/2010/welcome#comments</comments>
 <category domain="http://andunix.net/category/blogging">Blogging</category>
 <category domain="http://andunix.net/tag/blogging">blogging</category>
 <category domain="http://andunix.net/tag/drupal">drupal</category>
 <pubDate>Sun, 28 Feb 2010 23:00:00 +0000</pubDate>
 <dc:creator>andunix</dc:creator>
 <guid isPermaLink="false">1 at http://andunix.net</guid>
  <feedburner:origLink>http://andunix.net/blog/2010/welcome</feedburner:origLink></item>
  <item>
    <title>ReLAX</title>
    <link>http://feedproxy.google.com/~r/andunix/net/~3/hAPsQZOJuZ4/relax</link>
    <description>&lt;p&gt;Thanks to &lt;a href="http://www.synapseninferno.org/"&gt;Wolfgang Stief&lt;/a&gt; and &lt;a href="http://blogs.sun.com/constantin"&gt;Constantin Gonzalez&lt;/a&gt;, I got hold on one of the proceedings of the &lt;a href="http://www.linux-kongress.org/2009/"&gt;Linux Kongress&lt;/a&gt; and &lt;a href="http://www.osdevcon.org/2009/"&gt;OpenSolaris Developer Conference&lt;/a&gt;.&lt;br /&gt;
In this book, I found amoung other, also very interesting, articles one about &lt;a href="http://lax.sourceforge.net/"&gt;LAX&lt;/a&gt; by Thomas Groß.&lt;/p&gt;
&lt;p&gt;LAX has some very interesiting concepts, but, unfortunately, it doesn't fit my needs.&lt;br /&gt;
So I decided to take some of the concepts of LAX and build my own sysadmin-automation-framework.&lt;/p&gt;
&lt;p&gt;In lack of a good project name, I named it "ReLAX".&lt;/p&gt;
&lt;p&gt;To get startet, here is a small comparison of the concepts of LAX and ReLAX:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The most fascinating idea is the building of an API with shell-scripts. I adopted this from LAX.&lt;/li&gt;
&lt;li&gt;LAX uses an LDAP server to store the configuration. I decided to allow any server which can be read by ''curl'', ''wget'' or ''cat''. This allows http, https, ftp, ftps and file URLs.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That's it for now, stay tuned...&lt;/p&gt;
&lt;p&gt;I started documenting the &lt;a href="http://andunix.info/relax/api/"&gt;API&lt;/a&gt;, so you might want to have a look there..&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/andunix/net/~4/hAPsQZOJuZ4" height="1" width="1"/&gt;</description>
     <comments>http://andunix.net/blog/2009/relax#comments</comments>
 <category domain="http://andunix.net/tag/api">api</category>
 <category domain="http://andunix.net/tag/framework">framework</category>
 <category domain="http://andunix.net/tag/project">project</category>
 <category domain="http://andunix.net/tag/project_relax">project_relax</category>
 <category domain="http://andunix.net/category/scripting">Scripting</category>
 <category domain="http://andunix.net/tag/scripting">scripting</category>
 <category domain="http://andunix.net/tag/shell">shell</category>
 <category domain="http://andunix.net/tag/sysadmin">sysadmin</category>
 <pubDate>Fri, 27 Nov 2009 16:36:00 +0000</pubDate>
 <dc:creator>andunix</dc:creator>
 <guid isPermaLink="false">12 at http://andunix.net</guid>
  <feedburner:origLink>http://andunix.net/blog/2009/relax</feedburner:origLink></item>
  <item>
    <title>Found Geocache GC1VY11 "Ringpromenade"</title>
    <link>http://feedproxy.google.com/~r/andunix/net/~3/fP4LPxpaoL8/geocache_gc1vy11</link>
    <description>&lt;p&gt;Yesterday, I visited my first &lt;a href="http://www.geocaching.com/seek/cache_details.aspx?guid=a04f5c71-9796-42a8-8b9a-1838e0130278"&gt;geocache&lt;/a&gt;.&lt;br /&gt;
For those interested, here is evidence:&lt;/p&gt;
&lt;p&gt;&lt;img src="/sites/andunix/2009/2009-10-25_gc1vy11.png" alt="geocache logbook" title="geocache logbook" /&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/andunix/net/~4/fP4LPxpaoL8" height="1" width="1"/&gt;</description>
     <comments>http://andunix.net/blog/2009/geocache_gc1vy11#comments</comments>
 <category domain="http://andunix.net/tag/geocache">geocache</category>
 <category domain="http://andunix.net/category/geocaching">Geocaching</category>
 <category domain="http://andunix.net/tag/gps">gps</category>
 <category domain="http://andunix.net/tag/outdoor">outdoor</category>
 <pubDate>Mon, 26 Oct 2009 11:36:00 +0000</pubDate>
 <dc:creator>andunix</dc:creator>
 <guid isPermaLink="false">11 at http://andunix.net</guid>
  <feedburner:origLink>http://andunix.net/blog/2009/geocache_gc1vy11</feedburner:origLink></item>
  </channel>
</rss>
