aboutsummaryrefslogtreecommitdiff
path: root/buildbot/bot
diff options
context:
space:
mode:
Diffstat (limited to 'buildbot/bot')
-rwxr-xr-xbuildbot/bot17
1 files changed, 17 insertions, 0 deletions
diff --git a/buildbot/bot b/buildbot/bot
new file mode 100755
index 0000000..d20d677
--- /dev/null
+++ b/buildbot/bot
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+
+if [[ $1 != 'start' && $1 != 'stop' ]]; then
+ echo "Syntax: $0 <start|stop> [bot-dir]"
+ exit -1
+fi
+ACTION=$1
+BOTDIR=/opt/buildbot
+if [[ $2 != '' ]]; then
+ BOTDIR=$2
+fi
+
+if [[ $ACTION = 'start' ]]; then
+ sudo -u buildbot buildslave stop $BOTDIR
+fi
+
+sudo -u buildbot buildslave $ACTION $BOTDIR