monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Escape quotes


From: Kizito Porta Balanyà
Subject: Re: Escape quotes
Date: Wed, 28 Jan 2015 16:04:50 +0100

Sorry, I was wrong.

The check program should not have quotes.  The next sentence works ok:
check program checkService_Symantec with path
/usr/local/KSR/service.sh query "Symantec Antivirus" Rtvscan.exe

The status sentence is different. Works with the following cases:

OK -> if status != 0 then exec "/usr/local/KSR/service.sh start
'Symantec\ Antivirus' Rtvscan.exe"
OK ->     if status != 0 then exec "/usr/local/KSR/service.sh start
'Symantec Antivirus' Rtvscan.exe"

But, doen'st work with the next:

KO -> if status != 0 then exec '/usr/local/KSR/service.sh start
"Symantec Antivirus" Rtvscan.exe'
    #if status != 0 then exec "/usr/local/KSR/service.sh start
"Symantec Antivirus" Rtvscan.exe"
KO -> if status != 0 then exec "/usr/local/KSR/service.sh start
"Symantec\ Antivirus" Rtvscan.exe"

Thanks for your time.


2015-01-27 17:23 GMT+01:00 Kizito Porta Balanyà <address@hidden>:
> Hello, using simple quotes with the following sentences:
>
> check program checkService_Symantec with path
> '/usr/local/KSR/service.sh query "Symantec Antivirus" Rtvscan.exe'
>     if status != 0 then exec '/usr/local/KSR/service.sh start
> "Symantec Antivirus" Rtvscan.exe'
>
> Generates a core dump:
> /etc/monitrc:89: Program does not exist: ''/usr/local/KSR/service.sh
> query "Symantec Antivirus" Rtvscan.exe''
> /etc/monitrc:89: Program does not exist: ''/usr/local/KSR/service.sh
> query "Symantec Antivirus" Rtvscan.exe''
> /etc/monitrc:90: Program does not exist: ''/usr/local/KSR/service.sh
> start "Symantec Antivirus" Rtvscan.exe''
> AssertException: File '/usr/local/KSR/service.sh query "Symantec
> Antivirus" Rtvscan.exe' does not exist
>  raised in Command_new at src/system/Command.c:352
> Aborted (core dumped)
>
> Thanks a lot.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]