hobbit client - startup script for hpux
list Marco Avvisano
Hi all, someone have startup script for client on hpux? thanks Marco
list Hobbit User
On Fri, June 22, 2007 03:26, Marco Avvisano wrote:
Hi all, someone have startup script for client on hpux?
Here's the one for 11.11 from the user-a157674ff225@xymon.invalid:
#!/sbin/sh
#
# hobbit-client This shell script takes care of starting and stopping
# the hobbit client.
#
#
# NOTE: This script is not configurable! Any changes made to this
# script will be overwritten when you upgrade.
#
PATH=/usr/sbin:/usr/bin:/sbin
export PATH
rval=0
# Check the exit value of a command run by this script. If non-zero, the
# exit code is echoed to the log file and the return value of this script
# is set to indicate failure.
set_return() {
x=$?
if [ $x -ne 0 ]; then
echo "EXIT CODE: $x"
rval=1 # script FAILed
fi
}
RE_check() {
if [ "$HOBBIT_SERVERS" = "" ]; then
echo "Please configure HOBBIT_SERVERS in
/etc/rc.config.d/hobbit-client"
exit 1
fi
}
RE_prestart() {
DMNOPTS=""
set $HOBBIT_SERVERS
if [ $# -eq 1 ]; then
echo "BBDISP=\"$HOBBIT_SERVERS\""${HOBBIT_PREFIX}/var/run/hobbitclient-runtime.cfg echo "BBDISPLAYS=\"\""${HOBBIT_PREFIX}/var/run/hobbitclient-runtime.cfg else echo "BBDISP=\"0.0.0.0\""${HOBBIT_PREFIX}/var/run/hobbitclient-runtime.cfg echo "BBDISPLAYS=\"$HOBBIT_SERVERS\""${HOBBIT_PREFIX}/var/run/hobbitclient-runtime.cfg fi if [ "$HOBBIT_CLIENTHOSTNAME" != "" ]; then
DMNOPTS="${DMNOPTS} --hostname=${HOBBIT_CLIENTHOSTNAME}"
fi
if [ "$HOBBIT_CLIENTOS" != "" ]; then
DMNOPTS="${DMNOPTS} --os=${HOBBIT_CLIENTOS}"
fi
}
RE_start() {
RE_check
RE_prestart
# Start daemons.
su $HOBBIT_USER -c "$HOBBIT_DAEMON $DMNOPTS start"
set_return
return $rval
}
RE_stop() {
RE_check
# Stop daemons.
su $HOBBIT_USER -c "$HOBBIT_DAEMON stop"
set_return
return $rval
}
RE_restart() {
RE_check
RE_prestart
# Restart daemons.
su $HOBBIT_USER -c "$HOBBIT_DAEMON $DMNOPTS restart"
set_return
return $rval
}
case $1 in
'start_msg')
echo "Starting the Hobbit Monitoring Client"
;;
'stop_msg')
echo "Stopping the Hobbit Monitoring Client"
;;
'start')
# source the system configuration variables
if [ -f /etc/rc.config ] ; then
. /etc/rc.config
else
echo "ERROR: /etc/rc.config defaults file MISSING"
fi
# Check to see if this script is allowed to run...
if [ "$HOBBIT_CLIENT_START" != 1 ]; then
rval=2
else
# Execute the commands to start your subsystem
RE_start
rval=$?
fi
;;
'stop')
# source the system configuration variables
if [ -f /etc/rc.config ] ; then
. /etc/rc.config
else
echo "ERROR: /etc/rc.config defaults file MISSING"
fi
# Check to see if this script is allowed to run...
if [ "$HOBBIT_CLIENT_START" != 1 ]; then
rval=2
else
# Execute the commands to stop your subsystem
RE_stop
rval=$?
fi
;;
'restart')
# source the system configuration variables
if [ -f /etc/rc.config ] ; then
. /etc/rc.config
else
echo "ERROR: /etc/rc.config defaults file MISSING"
fi
# Check to see if this script is allowed to run...
if [ "$HOBBIT_CLIENT_START" != 1 ]; then
rval=2
else
# Execute the commands to restart your subsystem
RE_restart
rval=$?
fi
;;
'condrestart')
# source the system configuration variables
if [ -f /etc/rc.config ] ; then
. /etc/rc.config
else
echo "ERROR: /etc/rc.config defaults file MISSING"
fi
# Check to see if this script is allowed to run...
if [ "$HOBBIT_CLIENT_START" != 1 ]; then
rval=2
else
# Execute the commands to restart your subsystem
if ps -fu $HOBBIT_USER | grep -q
[h]obbit/client/bin/hobbitlaunch; then
RE_restart
rval=$?
fi
fi
;;
*)
echo "usage: $0 {start|stop|start_msg|stop_msg|restart|condrestart}"
rval=1
;;
esac
exit $rval
list Marco Avvisano
Thanks, Marco ----- Original Message ----- From: "Hobbit User" <user-24d6f8323faa@xymon.invalid> To: <user-ae9b8668bcde@xymon.invalid> Sent: Friday, June 22, 2007 2:20 PM Subject: Re: [hobbit] hobbit client - startup script for hpux
On Fri, June 22, 2007 03:26, Marco Avvisano wrote:Hi all, someone have startup script for client on hpux?Here's the one for 11.11 from the user-a157674ff225@xymon.invalid: #!/sbin/sh # # hobbit-client This shell script takes care of starting and stopping # the hobbit client. # # # NOTE: This script is not configurable! Any changes made to this # script will be overwritten when you upgrade. # PATH=/usr/sbin:/usr/bin:/sbin export PATH rval=0 # Check the exit value of a command run by this script. If non-zero, the # exit code is echoed to the log file and the return value of this script # is set to indicate failure. set_return() { x=$? if [ $x -ne 0 ]; then echo "EXIT CODE: $x" rval=1 # script FAILed fi } RE_check() { if [ "$HOBBIT_SERVERS" = "" ]; then echo "Please configure HOBBIT_SERVERS in /etc/rc.config.d/hobbit-client" exit 1 fi } RE_prestart() { DMNOPTS="" set $HOBBIT_SERVERS if [ $# -eq 1 ]; then echo "BBDISP=\"$HOBBIT_SERVERS\""${HOBBIT_PREFIX}/var/run/hobbitclient-runtime.cfg echo "BBDISPLAYS=\"\""${HOBBIT_PREFIX}/var/run/hobbitclient-runtime.cfg else echo "BBDISP=\"0.0.0.0\""${HOBBIT_PREFIX}/var/run/hobbitclient-runtime.cfg echo "BBDISPLAYS=\"$HOBBIT_SERVERS\""${HOBBIT_PREFIX}/var/run/hobbitclient-runtime.cfg fi if [ "$HOBBIT_CLIENTHOSTNAME" != "" ]; thenDMNOPTS="${DMNOPTS} --hostname=${HOBBIT_CLIENTHOSTNAME}" fi if [ "$HOBBIT_CLIENTOS" != "" ]; then DMNOPTS="${DMNOPTS} --os=${HOBBIT_CLIENTOS}" fi } RE_start() { RE_check RE_prestart # Start daemons. su $HOBBIT_USER -c "$HOBBIT_DAEMON $DMNOPTS start" set_return return $rval } RE_stop() { RE_check # Stop daemons. su $HOBBIT_USER -c "$HOBBIT_DAEMON stop" set_return return $rval } RE_restart() { RE_check RE_prestart # Restart daemons. su $HOBBIT_USER -c "$HOBBIT_DAEMON $DMNOPTS restart" set_return return $rval } case $1 in 'start_msg') echo "Starting the Hobbit Monitoring Client" ;; 'stop_msg') echo "Stopping the Hobbit Monitoring Client" ;; 'start') # source the system configuration variables if [ -f /etc/rc.config ] ; then . /etc/rc.config else echo "ERROR: /etc/rc.config defaults file MISSING" fi # Check to see if this script is allowed to run... if [ "$HOBBIT_CLIENT_START" != 1 ]; then rval=2 else # Execute the commands to start your subsystem RE_start rval=$? fi ;; 'stop') # source the system configuration variables if [ -f /etc/rc.config ] ; then . /etc/rc.config else echo "ERROR: /etc/rc.config defaults file MISSING" fi # Check to see if this script is allowed to run... if [ "$HOBBIT_CLIENT_START" != 1 ]; then rval=2 else # Execute the commands to stop your subsystem RE_stop rval=$? fi ;; 'restart') # source the system configuration variables if [ -f /etc/rc.config ] ; then . /etc/rc.config else echo "ERROR: /etc/rc.config defaults file MISSING" fi # Check to see if this script is allowed to run... if [ "$HOBBIT_CLIENT_START" != 1 ]; then rval=2 else # Execute the commands to restart your subsystem RE_restart rval=$? fi ;; 'condrestart') # source the system configuration variables if [ -f /etc/rc.config ] ; then . /etc/rc.config else echo "ERROR: /etc/rc.config defaults file MISSING" fi # Check to see if this script is allowed to run... if [ "$HOBBIT_CLIENT_START" != 1 ]; then rval=2 else # Execute the commands to restart your subsystem if ps -fu $HOBBIT_USER | grep -q [h]obbit/client/bin/hobbitlaunch; then RE_restart rval=$? fi fi ;; *) echo "usage: $0 {start|stop|start_msg|stop_msg|restart|condrestart}" rval=1 ;; esac exit $rval
list Marco Avvisano
i have tried to find the depot for hp 11.11 on razorsedge.org, with no fortune ... could you send me the url to download it?
▸
thanks
Marco
----- Original Message -----
From: "Hobbit User" <user-24d6f8323faa@xymon.invalid>
To: <user-ae9b8668bcde@xymon.invalid>
Sent: Friday, June 22, 2007 2:20 PM
Subject: Re: [hobbit] hobbit client - startup script for hpux
On Fri, June 22, 2007 03:26, Marco Avvisano wrote:Hi all, someone have startup script for client on hpux?Here's the one for 11.11 from the user-a157674ff225@xymon.invalid: #!/sbin/sh # # hobbit-client This shell script takes care of starting and stopping # the hobbit client. # # # NOTE: This script is not configurable! Any changes made to this # script will be overwritten when you upgrade. # PATH=/usr/sbin:/usr/bin:/sbin export PATH rval=0 # Check the exit value of a command run by this script. If non-zero, the # exit code is echoed to the log file and the return value of this script # is set to indicate failure. set_return() { x=$? if [ $x -ne 0 ]; then echo "EXIT CODE: $x" rval=1 # script FAILed fi } RE_check() { if [ "$HOBBIT_SERVERS" = "" ]; then echo "Please configure HOBBIT_SERVERS in /etc/rc.config.d/hobbit-client" exit 1 fi } RE_prestart() { DMNOPTS="" set $HOBBIT_SERVERS if [ $# -eq 1 ]; then echo "BBDISP=\"$HOBBIT_SERVERS\""${HOBBIT_PREFIX}/var/run/hobbitclient-runtime.cfg echo "BBDISPLAYS=\"\""${HOBBIT_PREFIX}/var/run/hobbitclient-runtime.cfg else echo "BBDISP=\"0.0.0.0\""${HOBBIT_PREFIX}/var/run/hobbitclient-runtime.cfg echo "BBDISPLAYS=\"$HOBBIT_SERVERS\""${HOBBIT_PREFIX}/var/run/hobbitclient-runtime.cfg fi if [ "$HOBBIT_CLIENTHOSTNAME" != "" ]; thenDMNOPTS="${DMNOPTS} --hostname=${HOBBIT_CLIENTHOSTNAME}" fi if [ "$HOBBIT_CLIENTOS" != "" ]; then DMNOPTS="${DMNOPTS} --os=${HOBBIT_CLIENTOS}" fi } RE_start() { RE_check RE_prestart # Start daemons. su $HOBBIT_USER -c "$HOBBIT_DAEMON $DMNOPTS start" set_return return $rval } RE_stop() { RE_check # Stop daemons. su $HOBBIT_USER -c "$HOBBIT_DAEMON stop" set_return return $rval } RE_restart() { RE_check RE_prestart # Restart daemons. su $HOBBIT_USER -c "$HOBBIT_DAEMON $DMNOPTS restart" set_return return $rval } case $1 in 'start_msg') echo "Starting the Hobbit Monitoring Client" ;; 'stop_msg') echo "Stopping the Hobbit Monitoring Client" ;; 'start') # source the system configuration variables if [ -f /etc/rc.config ] ; then . /etc/rc.config else echo "ERROR: /etc/rc.config defaults file MISSING" fi # Check to see if this script is allowed to run... if [ "$HOBBIT_CLIENT_START" != 1 ]; then rval=2 else # Execute the commands to start your subsystem RE_start rval=$? fi ;; 'stop') # source the system configuration variables if [ -f /etc/rc.config ] ; then . /etc/rc.config else echo "ERROR: /etc/rc.config defaults file MISSING" fi # Check to see if this script is allowed to run... if [ "$HOBBIT_CLIENT_START" != 1 ]; then rval=2 else # Execute the commands to stop your subsystem RE_stop rval=$? fi ;; 'restart') # source the system configuration variables if [ -f /etc/rc.config ] ; then . /etc/rc.config else echo "ERROR: /etc/rc.config defaults file MISSING" fi # Check to see if this script is allowed to run... if [ "$HOBBIT_CLIENT_START" != 1 ]; then rval=2 else # Execute the commands to restart your subsystem RE_restart rval=$? fi ;; 'condrestart') # source the system configuration variables if [ -f /etc/rc.config ] ; then . /etc/rc.config else echo "ERROR: /etc/rc.config defaults file MISSING" fi # Check to see if this script is allowed to run... if [ "$HOBBIT_CLIENT_START" != 1 ]; then rval=2 else # Execute the commands to restart your subsystem if ps -fu $HOBBIT_USER | grep -q [h]obbit/client/bin/hobbitlaunch; then RE_restart rval=$? fi fi ;; *) echo "usage: $0 {start|stop|start_msg|stop_msg|restart|condrestart}" rval=1 ;; esac exit $rval
list Hobbit User
▸
On Thu, June 28, 2007 05:56, Marco Avvisano wrote:
i have tried to find the depot for hp 11.11 on razorsedge.org, with no fortune ... could you send me the url to download it? thanks
First hit for Google search "site:www.razorsedge.org hpux" is http://www.razorsedge.org/~mike/software/hobbit/hpux/ Monolithic packages, i.e. server and client together.