<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>I am documenting this for whomever else may need this. This file is from an rpm xymon-client-4.3.10-1 that I got off the net somewhere. I just figured out why the "stop" does not work.<br><br>I set CLIENTHOSTNAME in here<br><br>=> more  /etc/default/xymon-client<br># Configure the Xymon client settings.<br><br># You MUST set the list of Xymon servers that this<br># client reports to.<br># It is good to use IP-adresses here instead of DNS <br># names - DNS might not work if there's a problem.<br>#<br># E.g. (a single Xymon server)<br>#   XYMONSERVERS="192.168.1.1" <br># or (multiple servers)<br>#   XYMONSERVERS="10.0.0.1 192.168.1.1" <br><br>XYMONSERVERS="10.65.1.66 10.65.20.151"<br><br># The defaults usually suffice for the rest of this file, <br># but you can tweak the hostname that the client reports <br># data with.<br><br># Thu Mar 21 15:30:16 EDT 2013<br>CLIENTHOSTNAME="$(hostname | cut -f1 -d'.')"<br><br># Red Hat EL version 3 uses a different vmstat layout<br># than all other Linux versions. So for a client running this<br># particular OS, set CLIENTOS as below.<br># Do NOT set this on any other Red Hat version.<br># CLIENTOS="rhel3"<br><br><br>but the script does not pass that info on the stop - so the start worked fine, but the stop not. Even the restart worked. I fixed below <br><br>#<br># xymon-client    This shell script takes care of starting and stopping<br>#                 the Xymon client.<br>#<br># chkconfig: 2345 80 20<br># description: Xymon is a network monitoring tool that allows \<br># you to monitor hosts and services. This client reports local \<br># system statistics (cpu-, memory-, disk-utilisation etc) \<br># to the Xymon server.<br><br><br>PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin<br>DAEMON=/usr/lib/xymon/client/runclient.sh<br>NAME=xymon-client<br>DESC=xymon-client<br><br>test -x $DAEMON || exit 0<br><br>CMD="$1"<br><br># Include xymon-client defaults if available<br>DMNOPTS=""<br>if [ -f /etc/default/xymon-client ] ; then<br>        . /etc/default/xymon-client<br>else<br>        echo "Installation failure - missing /etc/default/xymon-client"<br>        exit 1<br>fi<br><br>if [ "$XYMONSERVERS" = "" ]; then<br>        echo "Please configure XYMONSERVERS in /etc/default/xymon-client"<br>        exit 1<br>fi<br><br>set $XYMONSERVERS<br>if [ $# -eq 1 ]; then<br>        echo "XYMSRV=\"$XYMONSERVERS\"" >/var/run/xymonclient-runtime.cfg<br>        echo "XYMSERVERS=\"\"" >>/var/run/xymonclient-runtime.cfg<br>else<br>        echo "XYMSRV=\"0.0.0.0\"" >/var/run/xymonclient-runtime.cfg<br>        echo "XYMSERVERS=\"$XYMONSERVERS\"" >>/var/run/xymonclient-runtime.cfg<br>fi<br><br>if [ "$CLIENTHOSTNAME" != "" ]; then<br>        DMNOPTS="${DMNOPTS} --hostname=${CLIENTHOSTNAME}"<br>fi<br>if [ "$CLIENTOS" != "" ]; then<br>        DMNOPTS="${DMNOPTS} --os=${CLIENTOS}"<br>fi<br><br>set -e<br><br>case "$CMD" in<br>  start)<br>        echo -n "Starting $DESC: "<br>        su -c "$DAEMON $DMNOPTS start" - xymon<br>        echo "$NAME."<br>        ;;<br>  stop)<br> <font style="" color="#2672EC">       echo -n "Stopping $DESC: "</font><font style="" color="#2672EC"><br></font><font style="" color="#2672EC">        su -c "$DAEMON stop" - xymon   ### is</font><font style="" color="#2672EC"><br></font><b><font style="" color="#2672EC">##        su -c "$DAEMON $DMNOPTS stop" - xymon   # ## should be this!!!</font></b><font style="" color="#2672EC"><br></font><font style="" color="#2672EC">        echo "$NAME."</font><br>        ;;<br>  restart)<br>        echo -n "Restarting $DESC: "<br>        su -c "$DAEMON stop" - xymon<br>        su -c "$DAEMON $DMNOPTS start" - xymon<br>        echo "$NAME."<br>        ;;<br>  *)<br>        N=/etc/init.d/$NAME<br>        # echo "Usage: $N {start|stop|restart}" >&2<br>        echo "Usage: $N {start|stop|restart}" >&2<br>        exit 1<br>        ;;<br>esac<br><br>exit 0<br><br>                                       </div></body>
</html>