From bd53cab933df79c442c00878e6c3541db37cd945 Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Sat, 6 Mar 2010 22:19:20 -0700 Subject: [PATCH] Optional cycle time argument to run-ctf --- bin/run-ctf | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/run-ctf b/bin/run-ctf index f4a5b14..0a989e1 100755 --- a/bin/run-ctf +++ b/bin/run-ctf @@ -1,13 +1,17 @@ #! /bin/sh +# First argument is seconds between running everything +cycle=${1:-60} + POINTS=var/points/log cd $(dirname $0)/.. + while true; do # Timestamp start=$(date +%s) - next=$(expr $start + 60) + next=$(expr $start + $cycle) # If enabled, run tanks if ! [ -f var/disabled/tanks ]; then