Hello,

your start script most probably depends on some environment variable, which is 
not present when it is started via Monit. For security reasons Monit sets 
sandbox for program execution and sets only spartan PATH variable:

        PATH=/bin:/usr/bin:/sbin:/usr/sbin 

You can log the script output by wrapping it like this:

        start program = "/bin/bash -c '/usr/local/apache2/bin/apachectl -k 
start >> /tmp/start.log 2>&1'"


Regards,
Martin


On Aug 27, 2012, at 10:48 AM, Ajay Padhi <[email protected]> wrote:

> Dear Team,
> 
> The command for starting the apache service is 
> /usr/local/apache2/bin/apachectl -k start.
> 
> I am using the above command to start apache service .But monit is unable to 
> start the apache
> 
> Please let me know to start apache, using the above command.
> 
> regards,
> Ajay Padhi
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to