description "jam-admin"

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-admin
    chown jam-admin:jam-admin /var/run/jam-admin
end script

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