This commit adds support for starting multiple buildmaster instances using
systemd. A service configuration file allows to specify the filesystem location
of the buildmaster instances. A systemd target allows to start up or shut down
all buildmaster instances at once.
Gentoo-Bug: https://bugs.gentoo.org/570666
Closes: https://github.com/gentoo/gentoo/pull/1027
Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
newconfd "${FILESDIR}/buildmaster.confd" buildmaster
newinitd "${FILESDIR}/buildmaster.initd" buildmaster
- systemd_dounit "${FILESDIR}"/${PN}.service
+ systemd_dounit "${FILESDIR}/buildmaster.target"
+ systemd_newunit "${FILESDIR}/buildmaster_at.service" "buildmaster@.service"
+ systemd_install_serviced "${FILESDIR}/buildmaster_at.service.conf" "buildmaster@.service"
readme.gentoo_create_doc
}
--- /dev/null
+[Unit]
+Description=Buildbot target that allows to start or stop all buildmaster@*.service instances
+
+[Install]
+WantedBy=multi-user.target
--- /dev/null
+[Unit]
+Description=buildbot master daemon
+After=local-fs.target network.target
+PartOf=buildmaster.target
+
+[Service]
+Environment=BASEDIR=/var/lib/buildmaster
+Type=forking
+User=buildbot
+ExecStartPre=/usr/bin/buildbot checkconfig ${BASEDIR}/%i
+ExecStart=/usr/bin/buildbot start ${BASEDIR}/%i
+ExecStop=/usr/bin/buildbot stop ${BASEDIR}/%i
+
+[Install]
+WantedBy=buildmaster.target
+
--- /dev/null
+# Uncomment the following lines to configure the base directory for all buildmaster instances.
+
+#[Service]
+#Environment=BASEDIR=/var/lib/buildmaster
+