description "jam-web"

start on startup
start on runlevel [2345]
stop on runlevel [016]
limit nofile 20000 20000
limit core unlimited unlimited

respawn
respawn limit 10 5

pre-start script
    set -e
    mkdir -p /var/run/jam-web
    chown jam-web:jam-web /var/run/jam-web
end script

exec start-stop-daemon --start --chuid jam-web:jam-web --chdir /var/lib/jam-web --exec /var/lib/jam-web/script/package/upstart-run.sh