Xymon Mailing List Archive search

Possible Bug in xymon-client startup script

3 messages in this thread

list Daniel Schwitalla · Mon, 3 Feb 2014 12:58:04 -0500 ·
Hi all,

Scientific Linux 5.x and 6.x

xymon 4.3.13

When you establish a different host name in the file
/etc/default/xymon-client than the hostname derived by uname -n, the stop
and restart commands do not work.

If you set CLIENTHOSTNAME in /etc/default/xymon-client to something other
than `uname -n`, when the client starts, it creates a file in the form of
clientlaunch."CLIENTHOSTNAME".pid

The /etc/init.d/xymon-client (rpm/xymon-client.init) script uses a variable
called $DMNOPTS that contains configuration items to form the command line
options for xymon.  This script uses $DMNOPTS in the call to "runclient.sh
start".  It does not use $DMNOPTS in the call to "runclient.sh stop".  This
makes the stop process use `uname -n` to look for the pid file.  It does
not exist and the client does not get stopped.

Fix:

Change the following line in rpm/xymon-client.init from:

su -c "$DAEMON stop" - xymon

to:

su -c "$DAEMON $DMNOPTS stop" - xymon

It needs to be changed in the call to stop and restart the service.

Regards,

-- 
*Dan Schwitalla*
U.S. Geological Survey
list Henrik Størner · Mon, 03 Feb 2014 22:10:09 +0100 ·
quoted from Daniel Schwitalla
Den 03-02-2014 18:58, Schwitalla, Daniel skrev:
Fix:

Change the following line in rpm/xymon-client.init from:

su -c "$DAEMON stop" - xymon

to:

su -c "$DAEMON $DMNOPTS stop" - xymon

It needs to be changed in the call to stop and restart the service.
Thanks, it seems your Linux distro uses the standard RPM init-script, so 
I have applied your fix there. Hopefully they will pick it up.


Regards,
Henrik
list Jeremy Laidman · Tue, 4 Feb 2014 09:17:08 +1100 ·
quoted from Henrik Størner
On 4 February 2014 04:58, Schwitalla, Daniel <user-45c183c4287c@xymon.invalid> wrote:
Change the following line in rpm/xymon-client.init from:

su -c "$DAEMON stop" - xymon

to:

su -c "$DAEMON $DMNOPTS stop" - xymon

It needs to be changed in the call to stop and restart the service.
Ah yes, I thought I'd seen this before:
http://lists.xymon.com/pipermail/xymon/2013-September/038199.html

J