summaryrefslogtreecommitdiffstats
path: root/lava-slave/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'lava-slave/scripts')
-rwxr-xr-xlava-slave/scripts/start.sh14
-rwxr-xr-xlava-slave/scripts/stop.sh3
2 files changed, 17 insertions, 0 deletions
diff --git a/lava-slave/scripts/start.sh b/lava-slave/scripts/start.sh
new file mode 100755
index 0000000..f442e8d
--- /dev/null
+++ b/lava-slave/scripts/start.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+# Set LAVA Master IP
+if [[ -n "$LAVA_MASTER" ]]; then
+ sed -i -e "s/{LAVA_MASTER}/$LAVA_MASTER/g" /etc/lava-dispatcher/lava-slave
+fi
+
+service tftpd-hpa start || exit 4
+
+# FIXME lava-slave does not run if old pid is present
+rm -f /var/run/lava-slave.pid
+service lava-slave start || exit 5
+
+# start an http file server for boot/transfer_overlay support
+(cd /var/lib/lava/dispatcher; python -m SimpleHTTPServer 80)
diff --git a/lava-slave/scripts/stop.sh b/lava-slave/scripts/stop.sh
new file mode 100755
index 0000000..0f18456
--- /dev/null
+++ b/lava-slave/scripts/stop.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+service tftpd-hpa stop
+service lava-slave stop