# Generated by Chef
description "Monit service manager"

limit core unlimited unlimited

start on runlevel [2345]
stop on runlevel [!2345]

expect daemon
respawn

pre-start script
    test -x <%= @binary %> || { stop; exit 0; }
    <%= @binary %> -t || { echo "invalid configuration syntax" ; stop; exit 0; }
end script

exec <%= @binary %> -c <%= @conf_file %>

pre-stop exec <%= @binary %> -c <%= @conf_file %> quit

# Generated by Chef
description "Monit service manager"

limit core unlimited unlimited

start on runlevel [2345]
stop on runlevel [!2345]

expect daemon
respawn

pre-start script
    test -x <%= @binary %> || { stop; exit 1; }
    <%= @binary %> -t || { echo "invalid configuration syntax" ; stop; exit 1; }
end script

exec <%= @binary %> -c <%= @conf_file %>

pre-stop exec <%= @binary %> -c <%= @conf_file %> quit

Exit with 1 to indicate something went wrong (syntax check)
Exit with 1 to indicate something went wrong (syntax check)
