# Centreon Engine Service

description     "Centreon Engine"
author          "Matthieu Kermagoret <mkermagoret@merethis.com>"

start on (local-filesystems
	  and runlevel [2345])
stop on runlevel [!2345]

respawn

env HOME=@PREFIX_CONF@
umask 007

# Default of 5 seconds is too low.
kill timeout 180

pre-start script
    # Sanity checks.
    [ -r "$HOME/centengine.cfg" ]
end script

exec sudo -g @GROUP@ -u @USER@ -- @PREFIX_BIN@/centengine "$HOME/centengine.cfg"
