Patch from community to change way JAVA_HOME is set for debian
I just upgraded to openfire version 3.9.2 .
We roll our own java which causes problems.
In 3.9.1 the init script test for /usr/lib/jvm/java-6-sun and uses that as JAVA_HOME . I used to create a symlink there pointing to my java directory.
3.9.2 introduces the update-alternatives test.
I didn't have an update-alternatives set so I considered adding an entry for my java directory, but even if I do that, your sed doesn't doesn't match on my java path:
A more defensive command here might be:
It might also be a good idea to test for a standard directory like /usr/local/java before you do the update-alternatives testing.
Finally, if you perform the include of the defaults file first before any of these tests then I could just set JAVA_HOME in the /etc/defaults/openfire file.
Thanks for great product,
Lawren, Is the file in /etc/defaults/ or /etc/default/ ?
Thanks for the quick response,
/etc/default/openfire is packaged with openfire.
We already have an "Include" of the file in the init script on line 41.
If we move this Include to line 22 before any of the update-alternatives section then we will be able to set the JAVA_HOME variable and skip all the update-alternatives stuff.
As you see here I added the JAVA_HOME variable to the end of the /etc/default/openfire file:
I would still fix the sed line so it works with any java path.
Looks good. I tested it with my java and openjdk-7. Both now work with or without the variable set in /etc/default/openfire.
Thanks again for the quick response.