[Pkg-nagios-devel] Bug#339401: Inconsistent paths in init script

Daniel Pocock daniel at readytechnology.co.uk
Wed Nov 16 00:53:22 UTC 2005


Package: nagios-text
Version: 2:1.3-cvs.20050402-2.sarge.1

Looking at /usr/share/doc/nagios-common/NEWS.Debian.gz:

nagios (2:1.2-3.6) unstable; urgency=medium

  Some of the files was changed from /var/log/nagios to /var/cache/nagios
  directory. The following settings have to be updated in
  /etc/nagios/nagios.cfg file:

    temp_file=/var/cache/nagios/nagios.tmp
    status_file=/var/cache/nagios/status.log
    command_file=/var/cache/nagios/rw/nagios.cmd
    state_retention_file=/var/cache/nagios/status.sav

 -- Piotr Roszatycki <dexter at debian.org>  Mon, 27 Sep 2004 14:09:38 +0200

However, looking at /etc/init.d/nagios, I find this (notice /var/log 
instead of /var/cache):

        elif [ -f /usr/lib/nagios/plugins/check_nagios ]; then
                if ! /usr/lib/nagios/plugins/check_nagios -e 15 -F 
/var/log/nagios/status.log -C '/usr/sbin/nagios' > /dev/null; then
                        return 1    # isn't started


Perhaps the init script should attempt to do the following:

CHECK_NAGIOS=`grep '^nagios_check_command=' /etc/nagios/cgi.cfg | cut -b22-`
if ! ${CHECK_NAGIOS} ........

or alternatively:

STATUS_LOG=`grep '^nagios_check_command=' /etc/nagios/cgi.cfg | cut -d' 
' -f2`
if ! /usr/lib/nagios/plugins/check_nagios -e 15 -F ${STATUS_LOG} -C 
'/usr/sbin/nagios' > /dev/null; then



-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3214 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.alioth.debian.org/pipermail/pkg-nagios-devel/attachments/20051116/71a59409/smime.bin


More information about the Pkg-nagios-devel mailing list