In my /etc/init.d/nagios : 

status_nagios ()
{

        if test ! -f $NagiosRunFile; then
                echo "No lock file found in $NagiosRunFile"
                return 1
        fi

        NagiosPID=`head -n 1 $NagiosRun`
[ -f $NagiosPID == "" ] && (echo "Something went wrong reading the Nagios PID 
from $NagiosRunFile; exit 1)
        if test -x $NagiosCGI/daemonchk.cgi; then
                if $NagiosCGI/daemonchk.cgi -l $NagiosRun; then
                        return 0
                else
                        return 1
                fi
        else
                if ps -p $NagiosPID; then
                        return 0
                else
                        return 1
                fi
        fi

        return 1
}

When I restart Nagios : 

[EMAIL PROTECTED] conf]# /etc/rc.d/init.d/nagios start
/etc/rc.d/init.d/nagios: line 205: unexpected EOF while looking for matching `"'
/etc/rc.d/init.d/nagios: line 212: syntax error: unexpected end of file

-----Message d'origine-----
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Thomas Sluyter
Envoyé : vendredi 23 juin 2006 13:28
À : [email protected]
Objet : Re: [Nagios-users] nagios list of process IDs must follow -p

Just to be clear, I made a booboo in my e-mail from 11:42:

On 23 Jun, 2006, at 11:43, Thomas Sluyter wrote:
> [ -f $NagiosPID == "" ] || (echo "Something went wrong reading the
> Nagios PID from $NagiosRunFile);

Should be:

[ $NagiosPID == "" ] && "Something went wrong reading the Nagios PID  
from $NagiosRunFile; exit 1)


I have no clue what was in my coffee, but what I wrote earlier was  
horse crap. Sorry about that...

Cheers!


Thomas

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Nagios-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Nagios-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null

Reply via email to