May 1, 2016

Amazon echo for home automation using x10 and ifttt.com

The way this works currently is you need to be able to access a remote url inside your home.  Usually this will require the use of a dynamic dos host provider that can provide you with a hostname that points to your dynamic home address that is updated automatically by your router.  This is not exactly ideal security wise but obscure enough that you’re not likely to have some hacker turning your lights on and off just to mess with you and about the worst case scenario is they turn all your lights on while you are way turning up your electric bill.

March 24, 2015

Updating Bind File on a Zone Setup for RFC 2845

Bind is horrible at telling you what is going on if you happen to have the setup and mess it up.

February 26, 2015

Apache and mod_mono on rasbian

Mod_mono is much easier to config at the moment than it has been int he past.  Assuming you can use apt-get and installed the packages the following is all you need.

May 28, 2014

Upgrading Bugzilla

Here are the steps to upgrading bugzilla so you don’t end up wanting to commit homicidal acts.

Download a new version of bugzilla and resist the patches.

http://www.bugzilla.org/download/

Unpack this new version into a newdirectory. I use the /usr/local directory.

root@sourcecontrol:/usr/local# ls -l
total 40
drwxr-x--- 16 www-data www-data 4096 May 28 11:36 bugzilla-4.4.2
drwxr-x--- 16 www-data www-data 4096 May 28 11:46 bugzilla-4.4.4

Now I keep a symlink in /var/www that points to the current version so i delete and update the symlink here.

ln -s /usr/local/bugzilla-4.4.4 /var/www/bugzilla
ls -l /var/www
lrwxrwxrwx 1 root root   26 May 28 11:37 bugzilla -> /usr/local/bugzilla-4.4.4/

Next enter the new bugzilla directory and update the perl modules using the built in script.

./install-module.pl --all

Once that is complete copy the localconfig form the previous installation into the new installation.

cp /usr/local/bugzilla-4.4.2/localconfig /usr/local/bugzilla-4.4.4/

Then run checksetup.pl and you should be up and running.

./checksetup.pl

May 20, 2014

Ubuntu Upgrade Apache Fail

Upgraded to Ubuntu 14.04 LTS and discovered apache was not starting up.

 

The culprit was the following message.

AH00534: apache2: Configuration error: No MPM loaded.

After some digging around it appears the problem has to do with the module being enabled in apache so running the following as root or with sudo clears things up.

 

a2dismod mpm_itk

a2enmod mpm_itk

January 17, 2014

Ubuntu Gutsy Gibbon Hardy Heron update failed OEL upgrade

So today while trying to VM an old server at work I ran into a problem. It was running Ubuntu 7.10 (Gutsy Gibbon) and would not virtualize properly. I tied to upgrade it using the EOL Path at ubuntu.com to 8.04 (Hardy Heron) but it just wouldn’t work I ended up with the following.

#do-release-upgrade
Checking for a new ubuntu release
Failed Upgrade tool signature
Failed Upgrade tool
Done downloading
extracting '/tmp/tmpGEx2kl/hardy.tar.gz'
Failed to extract
Extracting the upgrade failed. There may be a problem with the network or with the server.

This clearly isn’t good but after paring my /etc/apt/sources.list down to the following I was still getting the same error.

deb http://old-releases.ubuntu.com/ubuntu dapper main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu dapper-updates main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu dapper-security main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu dapper-proposed main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu dapper-backports main restricted universe multiverse

With the modification from archive.ubuntu.com to old-releases.ubuntu.com I figure it was really just modifying the server it was retrieving the files from and even though the remote server could be using the host header I though I would try modifying my /etc/hosts file to point to the same ip for archive.ubuntu.com as was resolved for old-releases.ubuntu.com.

/etc/hosts
91.189.88.17 archive.ubuntu.com

It worked running do-release-upgrade now returns

Checking for a new ubuntu release
Done Upgrade tool signature
Done Upgrade tool
Done downloading
extracting '/tmp/tmpXpWtyk/hardy.tar.gz'
authenticate '/tmp/tmpXpWtyk/hardy.tar.gz' against '/tmp/tmpXpWtyk/hardy.tar.gz.
gpg'

Reading cache

Checking package manager

Continue running under SSH?

This session appears to be running under ssh. It is not recommended
to perform a upgrade over ssh currently because in case of failure it
is harder to recover.

If you continue, a additional ssh daemon will be started at port
'9004'.
Do you want to continue?

So apparently really old versions of ubuntu have archive.ubuntu.com hard coded in the updater and this trick should get around it. Thank god they don’t use virtual hosts for their archives.

June 21, 2013

Mountain Lion broke X11

Want to run apps under linux and pipe the graphical display to your mac using mountain lion?  This is how you do it.

July 4, 2012

DDWRT Custom Nocat Splash

OK, the documentation on ddwrt no cat splash kind of works but mostly just leaves you wondering wtf.  It works with their little click me to login/accept page but how do you customize it.  First thing to realize is it may appear to be accepting your settings but it caches and doesn’t play a nice.  After a reboot you might be sitting there for a few minutes before boom it’s working and your left wondering what they hell did I do to make it work?

July 3, 2012

Raspberry Pi GPIO in .net

I setout to create a simple library for raspberry pi gpio using the slow but easy to work with file system gpio.  This is useful for low speed io such as controling relays and such.  If you can live with a couple hundred ms latency this is a useful class for that.  I am currently using it to control a set of lawn sprinklers and low voltage lighting.

January 10, 2008

Calendar Server for iCal

I’ve been struggling with Markspaces Sync Together for Mac OS ever since leopard came out. They had a notice on their website for months concerning incompatibility with leopard but no notice as to when or if they would be working on making it compatible. Finally the time came I was ready to figure something else out. I found all kinds of tutorials on setting up a .mac clone which seemed interesting but all I really wanted was to keep my contacts and various calendar events in sync. I also wanted to share this information with my wife’s machine without it being a big hassle. I had read about calendar server before so I decided to set out to get it installed.

I have been working with open sourced software like this for years so I expected some bumps but figured in a few hours of free time I should have it up and running. I was so utterly wrong I could not have imagined the pain this software would cause. First what little documentation there is pre supposes configuration options and package installations that are almost sure to be incorrect for anyone who attempts the install. Second the server makes use of some new technologies like extended attributes for files that while mentioned are not described in enough detail for anyone not already intimately familiar with to make use of as for most installations this is disabled by default. So the setup isn’t the easiest to grind through. The good news is if you know what hurdles await there really is nothing to it.

So here are some of the steps required to get it up and running under Ubuntu 7.10.

My assumptions are that you are at least running a base installation of ubuntu and that you have not removed any of the packages installed by default and are using the default ext3 file system. I will also assume you understand how to deal with any issues regarding apt-get and mirrors.

First you want to get any extras that might not be installed by default with the following command.

apt-get install curl zope3 python-xml python-pyopenssl python-dateutil python-xattr python-pysqlite2 python-twisted python-vobject python-kerberos

Next you want to setup the file system for the metadata storage. This part took me quite a while to figure out that it was indeed a showstopper not to have a file system that supports this interaction. Fortunately I was running ext3 so it was a simple as running the following command mount -o remount,user_xattr /. This remounts the root partition with the ability to read and write the required metadata. This is required for whatever partition you store the data on only and once you have done this you may want to add user_xattr to your /etc/fstab in the options section.

Once this has completed you are ready to get the server from svn. You can place this any number of places popular ones include /opt /var and /usr/local so change your directory accordingly and run the following command.

svn checkout http://svn.calendarserver.org/repository/calendarserver/CalendarServer/trunk CalendarServer

Keep in mind not everyone is a trunk kind of person you can also use the release versions found by pointing your browser to http://svn.calendarserver.org/repository/calendarserver/CalendarServer/tags/release/ and grabbing one of the directories you see in there and use that url in place of the one pointing to trunk.

After the files have finished downloading it is time to configure your server defaults you can do this by changing directory into the Calendar Server directory and running the command run -s once this has completed you need to create your config file so cd into conf and the run cp caldavd-test.plist caldavd-dev.plist. I don’t know why that was their naming convention but it is.

Now you have a working server ready to accept local connections to enable remote connections edit the caldavd-dev.plist and search for 127.0.0.1 and replace it with the external interface you wish the service to listen on. You can now configure your client to access the server to test out prior to getting into the config file and securing it for your personal needs.

The client connection from iCal was pretty simple you go to the iCal menu select preferences. Then you select the accounts tab click the plus sign to add a new account. Type in your own description and then the username and password to connect to the server. Next enter the url to the server begining with http or https depending on your setup. Then the hostname or ip of the server you are connecting to. Leave off the trailing / it will auto setup your path if you elave it off. Click add and you should be reading your online calendar.

Some things I hope to see in the future are event notifications when something has changed on the server it should notify the client to check for modifications. It should also maintain the connection to the server when iCal is closed and update notifications accordingly. Overall thought I’m happy with how it does work and glad I took the time to get it setup.