summarylogtreecommitdiffstats
path: root/buildkite-agent-bin.install
diff options
context:
space:
mode:
authorNarthana Epa2023-03-18 15:16:08 +1100
committerNarthana Epa2023-03-18 15:49:03 +1100
commitd2d903e4ebb092fd433c818e1a9146d64e143850 (patch)
tree827b6c901570c94d14f6b4a49b56f90ee476dd0b /buildkite-agent-bin.install
parent7bcc0b55f51847d3768f923a375da5d28abac3fb (diff)
downloadaur-d2d903e4ebb092fd433c818e1a9146d64e143850.tar.gz
Add post scripts
Diffstat (limited to 'buildkite-agent-bin.install')
-rwxr-xr-xbuildkite-agent-bin.install20
1 files changed, 20 insertions, 0 deletions
diff --git a/buildkite-agent-bin.install b/buildkite-agent-bin.install
new file mode 100755
index 000000000000..7d5d834ff30e
--- /dev/null
+++ b/buildkite-agent-bin.install
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+
+post_install() {
+ echo "To start the buildkite-agent service run"
+ echo " systemctl enable --now buildkite-agent"
+ echo "For multiple agents on the same machine, use the template"
+ echo " systemctl enable --now buildkite-agent@1"
+ echo " systemctl enable --now buildkite-agent@2"
+ echo " ...etc..."
+}
+
+post_upgrade() {
+ echo "Restarting any existing buildkite-agent systemd services"
+ systemctl try-restart buildkite-agent.service 'buildkite-agent@*.service'
+}
+
+pre_remove() {
+ echo "Stopping and disabling any buildkite-agent systemd services"
+ systemctl disable --now buildkite-agent.service 'buildkite-agent@*.service'
+}