Optional cycle time argument to run-ctf

This commit is contained in:
Neale Pickett 2010-03-06 22:19:20 -07:00
parent 2fd441b06f
commit bd53cab933
1 changed files with 5 additions and 1 deletions

View File

@ -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