#
# Upstart example script from wrep/daemonize-command
#
description "An example script with wrep/daemonize-command"
author "Acme"

# Tell Upstart to respawn our command on a crash
# stop restarting if it crashes more then 5 times within 10 seconds
respawn
respawn limit 5 10

# Tell Upstart to start us after MySQL started and shut us down on system shutdown
start on started mysql
stop on runlevel S

# Run as the www-data user and group (same as Apache is under in Ubuntu)
setuid www-data
setgid www-data

# The command Upstart should execute to start our daemon
exec php /path/to/project/app/console acme:examplecommand -e prod --no-debug -q
