Hello, I think I'm not right about the proper return code, I think the best is to be LSB compliant :
http://refspecs.linuxbase.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html return code should be 3 program is not running return code 0 when ossec is running. This would be very usefull as I would like puppet to be able to start the service when it is not running. Regards, On 8 February 2012 11:33, Hugo Deprez <[email protected]> wrote: > I forgot to say that the expecting return code for status when ossec is > not running is 1. > > Hugo > > > On 8 February 2012 09:57, Hugo Deprez <[email protected]> wrote: > >> Dear community, >> >> I just saw that the daemon ossec-control return code is always returning >> 0. >> Especially with the status command when ossec is not running : >> >> #/var/ossec/bin/ossec-control status; echo $? >> ossec-logcollector not running... >> ossec-syscheckd not running... >> ossec-agentd not running... >> ossec-execd not running... >> 0 >> >> >> Result when ossec is running : >> >> # /var/ossec/bin/ossec-control status; echo $? >> ossec-logcollector is running... >> ossec-syscheckd not running... >> ossec-agentd is running... >> ossec-execd is running... >> 0 >> >> Regards, >> >> Hugo >> >> >
