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