Openfire debian initscript doens't know ubuntu 10.04 new java location

At Ubuntu 10.04 (Lucid lynx) there changes in java engine… Openfire’s initscript checks for /usr/lib/jvm/java-1.5.0-sun and 6.0 variant, but ubuntu uses /usr/lib/jvm/default-java…

So I made this type of modification in /etc/init.d/openfire to make openfire to work:

if [ -z $JAVA_HOME ]

then
t=/usr/lib/jvm/java-1.5.0-sun && test -d $t && JAVA_HOME=$t
t=/usr/lib/jvm/default-java && test -d $t && JAVA_HOME=$t
fi

OF-367