The line of code in /etc/init.d/openfired where ./openfire.sh is referenced contains other TWO errors.
On my system "su" can't access /root/.bashrc file. Workaround: I added '-' option before - $OPENFIRE_USER
Then, on my system it was not able to access ./openfire script because "su" changes the current directory to /home/jive
Completely i've fixed it by:
1. Adding export JAVA_HOME=/opt/jdk1.5.0_13/ to /home/jive/.bashrc file
2. Change the body of execCommand()
function execCommand() {
OLD_PWD=`pwd`
cd $OPENFIRE_HOME/bin
CMD="./openfire $1"
su -c "cd $OPENFIRE_HOME/bin && $CMD" - $OPENFIRE_USER &
sleep 1 # allows prompt to return
cd $OLD_PWD
}
it looks a little awfull, can you fix it later, please.
Anyway. Thank you for EXCELLENT software!
-------
Configuration:
- which java
/usr/bin/which: no java in .....
- uname -a
Linux Tout 2.4.24 #4 Mon Jul 26 21:25:25 NOVST 2004 i586 unknown
- su -c "export | grep JAVA" - jive
declare -x JAVA_HOME="/opt/jdk1.5.0_13/"
CPU: 1 Intel Pentium 166 MMX
RAM: 128Mb
even if we create a softlink to openfire script, the init script does not work
It does not start / stop the server
the status reporting is also not working (.pid and /var/run/ files)