start on runlevel [2345]
stop on shutdown
respawn
post-stop script
   # To avoid stomping on runsv's owned by a different runsvdir
   # process, kill any runsv process that has been orphaned, and is
   # now owned by init (process 1).
   pkill -HUP -P 1 runsv$
end script
exec <%= @install_path %>/embedded/bin/runsvdir-start

start on runlevel [2345]
stop on shutdown
respawn
pre-stop script
   # To avoid Enterprise Chef service processes from being orphaned,
   # we need to ensure everything is stopped before we kill our
   # runsvdir process.
   /usr/bin/private-chef-ctl stop
end script
post-stop script
   # To avoid stomping on runsv's owned by a different runsvdir
   # process, kill any runsv process that has been orphaned, and is
   # now owned by init (process 1).
   pkill -HUP -P 1 runsv$
end script
exec <%= @install_path %>/embedded/bin/runsvdir-start

Stop all EC processes before stopping Upstart job
Stop all EC processes before stopping Upstart job
