diff options
Diffstat (limited to 'testing/buildbot/buildmaster.initd')
-rw-r--r-- | testing/buildbot/buildmaster.initd | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/testing/buildbot/buildmaster.initd b/testing/buildbot/buildmaster.initd index 313365f3a6..05c1a10104 100644 --- a/testing/buildbot/buildmaster.initd +++ b/testing/buildbot/buildmaster.initd @@ -1,8 +1,9 @@ -#!/sbin/runscript +#!/sbin/openrc-run # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 extra_started_commands="reload" +extra_stopped_commands="create" depend() { need net @@ -52,3 +53,17 @@ reload() { "${BASEDIR}"/buildmaster.pid eend $? } + +create() { + if [ -e "${BASEDIR}"/buildbot.tac -o -e "${BASEDIR}"/master.cfg ]; then + eerror "${BASEDIR} already contains buildbot.tac or master.cfg" + return 1 + fi + ebegin "Creating buildmaster in ${BASEDIR}" + start-stop-daemon -u "${USERNAME}" \ + --exec /usr/bin/buildbot \ + -- create-master -r "${BASEDIR}" + mv "${BASEDIR}"/master.cfg.sample "${BASEDIR}"/master.cfg + ewarn "Remember to customize exemplary master.cfg in ${BASEDIR}" + eend $? +} |