description "upstart bamboo remote agent daemon for imaging CI job"

start on runlevel [2345]
stop on runlevel [!2345]


chdir /home/zoox/bamboo-agent-home

pre-start exec sudo -i -u zoox java -jar /home/zoox/bamboo/atlassian-bamboo-agent-installer.jar https://bamboo.zooxlabs.com/agentServer/ start

post-stop exec sudo -i -u zoox java -jar /home/zoox/bamboo/atlassian-bamboo-agent-installer.jar https://bamboo.zooxlabs.com/agentServer/ stop

respawn
respawn limit 10 30
