Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(971)

Unified Diff: skolo/raspberry-pi/swarming

Issue 1930143002: Make swarming bootstrap at boot, not login (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« skolo/raspberry-pi/start_swarming ('K') | « skolo/raspberry-pi/startup-script.sh ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skolo/raspberry-pi/swarming
diff --git a/skolo/raspberry-pi/swarming b/skolo/raspberry-pi/swarming
new file mode 100644
index 0000000000000000000000000000000000000000..c57c79f7f32d54982cbc35aacdcb6ae66da933f2
--- /dev/null
+++ b/skolo/raspberry-pi/swarming
@@ -0,0 +1,30 @@
+#!/bin/sh
+# /etc/init.d/swarming
+### BEGIN INIT INFO
+# Provides: swarming
+# Required-Start: $remote_fs $syslog
+# Required-Stop: $remote_fs $syslog
+# Default-Start: 3 5
+# Default-Stop: 0 6
+# Short-Description: Either initializes swarming or starts it
+# Description: Either initializes swarming or starts it
+### END INIT INFO
+
+case "$1" in
+ start)
+ # Hack to get swarming access to /b
+ chmod 777 /b
+ # We need to run swarming as chrome-bot. Running it as root can cause issues.
+ runuser -l chrome-bot -c '/opt/start_swarming' > /var/log/startup.log 2>/var/log/startup.err
+ ;;
+ stop)
+ echo "Stopping swarming"
+ /usr/bin/python /b/swarm_slave/swarming_bot.zip stop_bot
+ ;;
+ *)
+ echo "Usage: /etc/init.d/start start-swarming {start|stop}"
+ exit 1
+ ;;
+esac
+
+exit 0
« skolo/raspberry-pi/start_swarming ('K') | « skolo/raspberry-pi/startup-script.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698