cat start.sh
#!/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/src/jre1.6.0_02/"
LOCATION=$HOSTNAME
RMI_HOST="canis"
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 &