summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pbot29
1 files changed, 29 insertions, 0 deletions
diff --git a/pbot b/pbot
new file mode 100644
index 0000000..ac65193
--- /dev/null
+++ b/pbot
@@ -0,0 +1,29 @@
+#! /bin/bash
+
+declare -a pids
+
+cd /home/pbot
+
+./envbot &
+pids[0]=$!
+
+./pbot-ng_fixer &
+pids[1]=$!
+
+./labs_change_detector &
+pids[2]=$!
+
+function closedown
+{
+ for pid in ${pids[@]}
+ do
+ kill $pid
+ done
+}
+
+trap "closedown" SIGINT SIGTERM
+
+while true
+do
+ sleep 5h
+done