Same to you. Thanks for letting me double my number of posts here.
Ah, the original problem might be caused by a bug that seems to be fixed in the new alpha release (2.3.0 alpha): āFixed jive-messengerd script to have unix line endings.ā
Very cool app! I have installed Jive Messenger, and am about to take it for a spin. Saw this thread though, and took a detour to solve the start/stop problem. Hereā's my solution for SUSE 9.3 Proā¦
Use this start/stop script in place of the default, and put it in the /etc/init.d directory.
/etc/init.d/jive-messengerd
#!/bin/sh
- jive-messengerd
-
chkconfig: 2345 20 80
-
description: Used to start and stop the jive messenger XMPP server
-
Script used to start jive messenger as daemon
-
The script has currently been tested on SUSE Linux Pro 9.3.
-
before running this script make sure $MESSENGER_HOME/bin/messenger is
-
executable by the user you want to run messenger as
-
(chmod +x $MESSENGER_HOME/bin/messenger)
-
This script should be copied into /etc/init.d and linked into
-
your default runlevel directory.
-
You can find your default runlevel directory by typing:
-
grep default /etc/inittab
-
Link to the directory like follows
-
cd /etc/rc.d
-
ln -s ā¦/init.d/jive-messengerd $90jive-messengerd
-
BEGIN INIT INFO
-
Provides: jive-messengerd
-
Required-Start: $network $local_fs $syslog
-
Required-Stop:
-
Default-Start: 3 5
-
Default-Stop: 1 2
-
Short-Description: Used to start and stop the jive messenger XMPP server
-
Description: Script used to start jive messenger as daemon.
The script has currently been tested on SUSE Linux Pro 9.3.
- END INIT INFO
. /etc/rc.status
-
Shell functions sourced from /etc/rc.status:
-
rc_check check and set local and overall rc status
-
rc_status check and set local and overall rc status
-
rc_status -v ditto but be verbose in local rc status
-
rc_status -v -r ditto and clear the local rc status
-
rc_failed set local and overall rc status to failed
-
rc_reset clear local rc status (overall remains)
-
rc_exit exit appropriate to overall rc status
-
First reset status of this service
rc_reset
-
If a messenger home variable has not been specified, try to determine it
-
(See /etc/sysconfig/jive-messengerd for environment variable settings)
if ; then
if [ -d ā/opt/jive_messengerā ]; then
MESSENGER_HOME="/opt/jive_messenger"
elif [ -d ā/usr/local/jive_messengerā ]; then
MESSENGER_HOME="/usr/local/jive_messenger"
else
echo āCould not find Jive Messenger installation under /opt or /usr/localā
echo āPlease specify the Jive Messenger installation locationā
echo āin environment variable MESSENGER_HOMEā
exit 1
fi
fi
-
Set the name of the running process.
-
(NOT the same as the name of the binary)
MESSENGER_BIN="$MESSENGER_HOME/jre/bin/java"
function execCommand() {
OLD_PWD=pwd
cd $MESSENGER_HOME/bin
CMD="./messenger $1"
su -c ā$CMDā $MESSENGER_USER &
cd $OLD_PWD
}
case ā$1ā in
start)
echo -n āStarting jive-messengerd XMPP serverā
execCommand āstartā
- Remember status and be verbose
rc_status -v
;;
stop)
echo -n āShutting down jive-messengerd XMPP serverā
execCommand āstopā
- Remember status and be verbose
rc_status -v
;;
try-restart)
$0 status >/dev/null && $0 restart
- Remember status and be quiet
rc_status
;;
restart)
-
If first returns OK call the second, if first or
-
second command fails, set echo return value.
$0 stop && sleep 2 && $0 start
- Remember status and be quiet
rc_status
;;
force-reload)
-
Exclusive possibility: Some services must be stopped
-
and started to force a new load of the configuration.
echo -n āReload jive-messengerd XMPP serverā
killproc -HUP $MESSENGER_BIN
- Remember status and be verbose
rc_status -v
;;
reload)
-
Exclusive possibility: Some services must be stopped
-
and started to force a new load of the configuration.
echo -n āReloading jive-messengerd XMPP serverā
killproc -HUP $MESSENGER_BIN
- Remember status and be verbose
rc_status -v
;;
status)
echo -n āChecking for jive-messengerd XMPP serverā
-
Check status with checkproc(8), if process is running
-
checkproc will return with exit status 0.
checkproc $MESSENGER_BIN
rc_status -v
;;
*)
echo āUsage: $0 {start|stop|status|try-restart|restart|force-reload|reload}ā
exit 1
;;
esac
rc_exit
/code
Also put this SUSE Sysconfig file in the /etc/sysconfig directory, (yes itā's the same name as the script above, but a different location). No special file attributes need to be set; root/root for ID/group, not executable. It exports the required environment variables before running /etc/init.d/jive-messengerd automagically.
/etc/sysconfig/jive-messengerd
Path: Network/Other/Jive-Messenger
-
Description: Basic configuration of the jive-messenger daemon
-
Type: string
-
Default: āā
-
Config: jive-messengerd
-
Type: string(/opt/jive_messenger,/usr/local/jive_messenger)
-
Default: ā/opt/jive_messengerā
-
Config: jive-messengerd
-
Set this to tell this script where messenger lives
-
If this is not set the script will look for /opt/jive_messenger, then /usr/local/jive_messenger
-
MESSENGER_HOME=
MESSENGER_HOME="/opt/jive_messenger"
-
Type: string
-
Default: ājiveā
-
Config: jive-messengerd
-
If there is a different user you would like to run this script as,
-
change the following line
MESSENGER_USER=jive
/code
You can run the default redhat-postinstall.sh script as root, and it works fine under SUSE 9.3.
/opt/jive_messenger/bin/extra/redhat-postinstall.sh
There is one bug I couldnā't quite solveā¦ When starting the script from withing āyast2 runlevelā, jive-messengerd fails to exit and hangs YAST2, (but the JM server does start). Other methods do work though, during boot and from a command line with:
/etc/init.d/jive-messengerd start
Maybe somebody can figure that one out and carry this ball into the endzone.
Brett