mirror of https://github.com/dirtbags/moth.git
Optional cycle time argument to run-ctf
This commit is contained in:
parent
2fd441b06f
commit
bd53cab933
|
@ -1,13 +1,17 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
|
||||||
|
# First argument is seconds between running everything
|
||||||
|
cycle=${1:-60}
|
||||||
|
|
||||||
POINTS=var/points/log
|
POINTS=var/points/log
|
||||||
|
|
||||||
cd $(dirname $0)/..
|
cd $(dirname $0)/..
|
||||||
|
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
# Timestamp
|
# Timestamp
|
||||||
start=$(date +%s)
|
start=$(date +%s)
|
||||||
next=$(expr $start + 60)
|
next=$(expr $start + $cycle)
|
||||||
|
|
||||||
# If enabled, run tanks
|
# If enabled, run tanks
|
||||||
if ! [ -f var/disabled/tanks ]; then
|
if ! [ -f var/disabled/tanks ]; then
|
||||||
|
|
Loading…
Reference in New Issue