[hobbit] Hobbit startup script.

HUBBARD, GREG ((EDS)) ghubbard at hp.com
Fri Jun 5 15:11:36 CEST 2009

Find something simple (like the syslog startup script) and hack it into a xymon startup script.  For the start command, "su - hobbit -c <wherever>runclient.sh".

Here is an example that I use:

#       Greg Hubbard, EDS, January 2006
#       Made from Solaris syslog startup script

BBHOME=/app/hobbit/client; export BBHOME
BBUSER=xymon; export BBUSER
HOST="`uname -n`.domain.com"

case "$1" in
        if [ -f $BBHOME/runclient.sh ]; then
                echo 'Hobbit client starting.'
                su - $BBUSER -c "cd $BBHOME; ./runclient.sh --hostname=$HOST start"

        if [ -f $BBHOME/runclient.sh ]; then

                su - $BBUSER -c "cd $BBHOME; ./runclient.sh stop"

        echo "Usage: $0 { start | stop }"
        exit 1
This is for a client.  The server startup is similar, except it runs the server startup script.  This is not the most clever or elaborate of scripts, but it does work for me.

From: David Peters [mailto:davidp at electronf.com]
Sent: Friday, June 05, 2009 5:09 AM
To: hobbit at hswn.dk
Subject: [hobbit] Hobbit startup script.


I understand that hobbit needs to run as the hobbit user, but it is a bit annoying to have the hobbit startup script require the hobbit user to run it.

When I want to run it automagically out of /etc/init.d I have to change the script to not check for hobbit and then do an su to the hobbit user thus:

su -c "/home/xymon/server/bin/hobbitlaunch --config=/home/xymon/server/etc/hobbitlaunch.cfg --env=/home/xymon/server/etc/hob
bitserver.cfg --log=/var/log/xymon/hobbitlaunch.log --pidfile=/var/log/xymon/hobbitlaunch.pid"

why is it done this way rather than as above, thus allowing the server to start out of init.d?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20090605/15bd8254/attachment.html>

More information about the Xymon mailing list