Xymon Mailing List Archive search

Start XYmon at boot in Ubuntu...

list L.M.J
Wed, 17 Dec 2008 16:19:33 +0100
Message-Id: <d66e5d98e2457c6abb3d583c6e99d53e@imap>


On Wed, 17 Dec 2008 12:32:08 +0100, Mathias Carlsson
<user-3db73aed6d27@xymon.invalid> wrote:
Hi!

I haven't found any way to start XYmon automatically at boot time...
It need to be started by user hobbit, and when I used update-rc it was
added in the startscripts, but I can't figure out how to get it started
by
user hobbit...
Anybody knows how to do this?
Hello Mathias

  I would like to share my own Hobbit starting script, working the same for
Xymon 


cat /etc/init.d/hobbit-client

#!/bin/bash

USER_HOBBIT="hobbit"  
PROG_PATH="/opt/hobbit-monitor"
HOBBIT_PID="${PROG_PATH}/client/logs/clientlaunch.${HOSTNAME}.pid"
cd /

case "$1" in
  start)
        su ${USER_HOBBIT} -c "${PROG_PATH}/client/runclient.sh start"
        ;;
  stop)
        su ${USER_HOBBIT} -c "${PROG_PATH}/client/runclient.sh stop"
        ;;

  restart)
        su ${USER_HOBBIT} -c "${PROG_PATH}/client/runclient.sh restart"
        ;;

  status)
        su ${USER_HOBBIT} -c "${PROG_PATH}/client/runclient.sh status"
        ;;

  *)
        echo "Usage: $NAME {start|stop|restart|status}" >&2
        exit 3
        ;;
esac


--- END ---

Please, fix according to your Xymon username and installation path : 
USER_HOBBIT="?"  
PROG_PATH="?"

  Good luck