powered by Jive Software

Messenger Script

If anyone is interested here’'s a little script I hacked up to help start|run|stop Messenger:

#!/bin/sh
#
#messenger.sh MESSENGER_HOME=/usr/local/jive_messenger_2_0_0_beta;export MESSENGER_HOME
JAVA_HOME=/usr/jdk1.5.0;export JAVA_HOME
JAVACMD=$JAVA_HOME/bin/java if [ "$1" = "start" ] ; then
  shift
  $JAVACMD -jar $MESSENGER_HOME/lib/startup.jar > /dev/null 2>&1 &
  echo $! > /var/run/messenger.pid elif [ "$1" = "stop" ] ; then
  shift
  kill -15 `cat /var/run/messenger.pid`
  rm -rf /var/run/messenger.pid elif [ "$1" = "run" ] ; then
  shift
  $JAVACMD -jar $MESSENGER_HOME/lib/startup.jar "$@" else
  echo "Usage:"
  echo "jive messenger (start|run|stop)"
  echo " start - start messenger in the background"
  echo " run - start messenger in the foreground"
  echo " stop - stop messenger"
  exit 0
fi