monit-general
[Top][All Lists]
Advanced

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

Syntax error trying to check program on php script


From: Paspao
Subject: Syntax error trying to check program on php script
Date: Thu, 8 May 2014 16:16:17 +0200

Hello,

I want to monitor a PHP script but I get a Sytax error .


This is the monit script:

check program test with path "/home/user/test.php"
        if status != 0 then alert 

I always get 

/etc/monit/monitrc:23: Error: syntax error 'test'

test.php is executable and contains :

#!/usr/bin/php -q
<?php
$err=1 ;
if($err != 0) exit(1);
?> 

If I run it in shell I get the correct $? of 0 or 1

Anyone knows how to solve this?

Thank you
P. 


reply via email to

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