All pastes #550989 Raw Edit

Someone

public text v1 · immutable
·published 2007-06-08 16:26 UTC
rendered paste body
#!/bin/sh -
#
# Starts the remote poller.
# Puts the logs in poll.log.<datestamp>
# w00t
#
# Tue Dec 12 23:05:42 GMT 2006 - dj@opennms.org
#

JAVA_HOME="/usr/local/java/j2sdk"
LOCATION="RDU"
RMI_HOST="opennsm.myfakehostname.com"


if [ "$JAVA_HOME" = "" ]; then
  echo "Set JAVA_HOME in this script."
  exit 1
fi
if [ "$LOCATION" = "" ]; then
  echo "Set the remote location in this script."
  exit 1
fi
if [ "$RMI_HOST" = "" ]; then
  echo "Set the RMI host in this script."
  exit 1
fi

log_file="/var/log/opennms/poll.log.`date '+%Y%m%d-%H%M%S'`"
#log_file="/dev/null"

exec nohup $JAVA_HOME/bin/java \
        -Dlog4j.logger=INFO \
        -jar opennms-remote-poller.jar \
        rmi://$RMI_HOST $LOCATION > $log_file 2>&1 &