« April 2006 | Main | June 2006 »

May 31, 2006

Linux Tomcat Chkconfig Script

I've been meaning to post this for a while, this is my script that can be used to allow tomcat to start and stop with the server cleanly.
It will startup tomcat as one of the last services (95) and shut it down pretty early too.

Feel free to take it, I primarly posted it here so that I can find it when I install tomcat on a new server.
#! /bin/bash
#
# tomcat          Start/Stop the Tomcat Http/Servlet server.
#
# chkconfig: 2345 95 65
# description: Tomcat is a java based HTTP/Servlet server
# processname: tomcat
# pidfile: /var/run/tomcat.pid

# Source function library.
. /etc/init.d/functions
. /etc/profile

RETVAL=0
TOMCAT_HOME=/usr/local/tomcat
# See how we were called.

start() {
        echo -n $"Starting Tomcat "
        $TOMCAT_HOME/bin/startup.sh
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && touch  /var/lock/subsys/tomcat
        return $RETVAL
}

stop() {
        echo -n $"Stopping Tomcat "
        $TOMCAT_HOME/bin/shutdown.sh
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/tomcat
        return $RETVAL
}

restart() {
        stop
        start
}


case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart)
        restart
        ;;
  status)
        ps ax | grep $TOMCAT_HOME
        ;;
  *)
        echo $"Usage: $0 {start|stop|status|restart}"
        exit 1
esac

exit $?

May 15, 2006

New Garden (pt2)

Its taken me a couple of weeks to post the update about the completion of our new garden bed, but if you read enough here you’ll know that i’m slack and doing even this soon is efficient by my standards.

So here they are, the completed construction photos and the rest of the plants in.

DownloadedPhonePics 014 DownloadedPhonePics 016

DownloadedPhonePics 015

DownloadedPhonePics 018

DSCN1195

DSCN1198

DSCN1199

And thats it, its been in the ground a few weeks now and the plants are a little bigger, but it is winter and they don’t grow that fast at this time of year anyway, but in a few months when the warmth comes back i’ll put up some updated photos of everything in full bloom.

Playing with Netbeans Mobility Pack

Recently I installed Netbeans 5.0 to try out the Matisse GUI editor, and so far its been great.  Now being an eclipse person its hard to cross over to NB full time, so i’m just using it for my GUI creation and doing all the heavy lifting in eclipse.

A new project at work relates to Mobile applications, thus brining be back to Netbeans again. After listening to the Java Posse and hearing about the Netbeans Mobility Pack I thought now is a good time to try it.

I have little to no experiance with MIDP applications, but within 10 mins of getting the Mobility Pack installed, I had a functioning application working and testable in a simulated phone. Ok, so it didn’t do much, but it did at least let me get my feet wet without all the extra work.

I especially like the Flow Design section that allows you to drag and drop links between screens to manage the navigation.

May 6, 2006

New Garden (pt1)

A few weekends ago, Rach and I decided to reduce some of the grass we have in the backyard by creating a new garden bed.  Well now its complete I know its a 3 day effort, here are the progressive photos. This is the first stage of garden preperation with the digging of the bed and filling of the topsoil.

1st Saturday

DSCN0002

I’m looking buggered by here, and its not even a 1/3 of the way done.

DSCN1144

DSCN1145

DSCN1147

Most of the way there, only about a 1/3 to go.

DSCN1148 DSCN1149

Me with dirty hands, thats not right….  and a “Foot Photo”

DSCN1156

DSCN1159

Now on to the edging.

DSCN1160

DSCN1161

There done, grass removed, edging in a days work down.

DSCN1162 

Sunday, a simple day, get 1 cubic meter of soil and complete the garden bed..

DSCN1163

DSCN1164 DSCN1165

DSCN1166 DSCN1167

Thats the story after 1 weekend, the next post will have the plants and construction along with the final photos.

Stay tuned.

Back on the Air

After an extended hiatus off the web, my servers are now publicly routeable.  With the move to the new house we got connected to a different DSL service that meant some configuration changes were required on the server end, after weeks of trying to get stuff done, Ross (ie.net.au) came over this morning and we got it licked once and for all. 

The servers now have a new IP and it seems that everything is routing fine.

Phew…  We now return you to your scheduled programming.