summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2010-12-20 21:04:47 +0000
committerArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2010-12-20 21:04:47 +0000
commitad29519dff8c3f531176334d6cff42ade2a9d37d (patch)
tree69ccfb14e165a99e0e075826df40986d3f1012bb /dev-util/buildbot/files
parentinit script creates /var/run/samba if needed , bug #346087 (diff)
downloadhistorical-ad29519dff8c3f531176334d6cff42ade2a9d37d.tar.gz
historical-ad29519dff8c3f531176334d6cff42ade2a9d37d.tar.bz2
historical-ad29519dff8c3f531176334d6cff42ade2a9d37d.zip
Version bump.
Package-Manager: portage-2.2.0_alpha9_p9/cvs/Linux x86_64
Diffstat (limited to 'dev-util/buildbot/files')
-rw-r--r--dev-util/buildbot/files/buildmaster.initd44
1 files changed, 44 insertions, 0 deletions
diff --git a/dev-util/buildbot/files/buildmaster.initd b/dev-util/buildbot/files/buildmaster.initd
new file mode 100644
index 000000000000..67f22dea399a
--- /dev/null
+++ b/dev-util/buildbot/files/buildmaster.initd
@@ -0,0 +1,44 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ -z "${BASEDIR}" ]; then
+ eerror "BASEDIR not set"
+ return 1
+ fi
+ if [ -z "${USERNAME}" ]; then
+ eerror "USERNAME not set"
+ return 1
+ fi
+ if [ ! -d "${BASEDIR}" ]; then
+ eerror "${BASEDIR} is not a directory"
+ return 1
+ fi
+ if [ ! -e "${BASEDIR}/buildbot.tac" ]; then
+ eerror "${BASEDIR} does not contain buildbot.tac"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting buildmaster in ${BASEDIR}"
+ start-stop-daemon --start -c "${USERNAME}" \
+ --exec /usr/bin/python -- /usr/bin/twistd \
+ --no_save \
+ --logfile="${BASEDIR}/twistd.log" \
+ --pidfile="${BASEDIR}/buildmaster.pid" \
+ --python="${BASEDIR}/buildbot.tac"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping buildmaster in ${BASEDIR}"
+ start-stop-daemon --stop --pidfile "${BASEDIR}/buildmaster.pid"
+ eend $?
+}