github.com/discordapp/buildkite-agent@v2.6.6+incompatible/templates/0.2/upstart.conf (about) 1 # Upstart is a process monitoring tool built into Ubuntu. You can use it to run 2 # the `buildbox-agent` process. The benefit of using upstart is that it will 3 # restart the process when you restart your server. 4 # 5 # 1. Download this template to /etc/init/buildbox-agent.conf 6 # 7 # sudo wget https://raw.githubusercontent.com/buildboxhq/buildbox-agent/master/templates/upstart.conf -O /etc/init/buildbox-agent.conf 8 # 9 # 2. Edit the file and replace your-build-user with the user you installed 10 # buildbox-agent as: 11 # 12 # sudo sed -i "s/your-build-user/[insert username here]/g" /etc/init/buildbox-agent.conf 13 # 14 # 3. Change the access-token: 15 # 16 # sudo sed -i "s/your-agent-access-token/[insert agent access token here]/g" /etc/init/buildbox-agent.conf 17 # 18 # 4. Start the process: 19 # 20 # sudo service buildbox-agent start 21 # 22 # 5. Logs will be available at /var/log/upstart/buildbox-agent.log 23 # 24 # sudo tail -f -n 200 /var/log/upstart/buildbox-agent.log 25 26 respawn 27 respawn limit 15 5 28 29 start on runlevel [2345] 30 stop on runlevel [06] 31 32 script 33 su - your-build-user -c "/home/your-build-user/.buildbox/buildbox-agent start --access-token your-agent-access-token" 34 end script