[hobbit] Client execution changes?

Henrik Stoerner henrik at hswn.dk
Tue Sep 13 07:53:18 CEST 2005


On Mon, Sep 12, 2005 at 08:04:10PM -0500, Craig Cook wrote:
> hobbitlaunch.cfg contains this:
> 
> [hobbitclient]
>         ENVFILE /home/hobbit/client/etc/hobbitclient.cfg
>         NEEDS hobbitd
>         CMD /home/hobbit/client/bin/hobbitclient.sh
>         LOGFILE $BBSERVERLOGS/hobbitclient.log
>         INTERVAL 5m
> 
> The actual client contains this file
> "runclient.sh"
> 
> They almost do the same thing...

"Almost" is the keyword here.

The default hobbitlaunch.cfg is created when Hobbit is compiled, and
therefore some of the environment settings can be determined by the
configure-script and put into the standard environment settings in the
hobbitserver.cfg/hobbitclient.cfg files.

For a client-install, that is not the case. You typically build the
client on one box, then copy the installation to all of the others
running the same OS. So when starting the client, you need some
run-time code to pick up e.g. the hostname of the box. runclient.sh
does that.

> Should the hobbitlaunch.cfg be changed to simply execute the 
> "runclient.sh" and use whatever settings has been defined in that file?

You shouldn't put any settings in runclient.sh - add them to
hobbitclient.cfg.

You could run the "runclient.sh" from hobbitlaunch.cfg, but that would
just start a second instance of the hobbitlaunch program - one for the
server part of Hobbit, and one for the client part. Seems a bit wasteful
to me, so I did it the other way around.

> Maybe add this to runclient.sh as well...
>   "restart")
>         if test -s $BASEDIR/logs/clientlaunch.pid
>         then                 $0 stop
>                 sleep 10
>                 $0 start
>         else
>                 echo "clientlaunch does not appear to be running, starting it"
>                 $0 start
>         fi
>         ;;

Done.


Henrik




More information about the Xymon mailing list