aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-01-17 11:15:36 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-01-17 11:15:36 +0200
commitc2b740d4560d8dc3f75cba65bae2ba93ea8e177c (patch)
tree158eeb991da360271bd9931c23898c81d2ed0ded
parentbac0b719dab28974853066a513dacd683283d6db (diff)
Update systemd .service file in preparation for multi-instance support
-rw-r--r--bbot/bbot-agent@.service11
1 files changed, 9 insertions, 2 deletions
diff --git a/bbot/bbot-agent@.service b/bbot/bbot-agent@.service
index 57e78d5..522fc3f 100644
--- a/bbot/bbot-agent@.service
+++ b/bbot/bbot-agent@.service
@@ -1,5 +1,11 @@
+# Notes:
+#
+# The template parameter is the instance number. Use `%I` in Description or
+# similar and %i everywhere else (`%I` is rewritten by Build OS monitor to
+# include the toolchain name, for example, `stage/%I`).
+#
[Unit]
-Description=bbot agent for %I
+Description=bbot agent instance %I
After=multi-user.target
[Service]
@@ -30,7 +36,8 @@ Environment=TOOLCHAIN_ID=
Environment="CONTROLLER_URL="
Environment="CONTROLLER_TRUST="
-ExecStart=/build/bots/%i/bin/bbot-agent --systemd-daemon \
+ExecStart=/build/bots/${TOOLCHAIN_NAME}/bin/bbot-agent \
+ --systemd-daemon \
--verbose ${VERBOSE} \
--auth-key ${AUTH_KEY} \
--cpu ${CPU} \