2009-10-07 11:10:18 -06:00
|
|
|
#! /bin/sh -e
|
|
|
|
|
|
|
|
ctime () {
|
|
|
|
stat -c %z $1 | awk '{ print $1; }'
|
|
|
|
}
|
|
|
|
|
|
|
|
rotate () {
|
|
|
|
mv $1 $1.$(ctime $1)
|
|
|
|
}
|
|
|
|
|
|
|
|
rotate /var/lib/ctf/puzzler.dat
|
|
|
|
rotate /var/lib/ctf/scores.dat
|
|
|
|
rotate /var/lib/ctf/passwd
|
|
|
|
rm -f /var/lib/ctf/flags/* || true
|
|
|
|
|
2009-10-09 08:55:51 -06:00
|
|
|
sv restart /var/service/ctf
|
|
|
|
|
2009-10-13 16:10:59 -06:00
|
|
|
echo "Removing tanks history"
|
|
|
|
rm -f /var/lib/tanks/ai/players/*
|
|
|
|
rm -rf /var/lib/tanks/results/*
|
|
|
|
rm -f /var/lib/tanks/winner
|
|
|
|
|
2009-10-07 11:10:18 -06:00
|
|
|
echo "Things you may want to tweak:"
|
|
|
|
find /var/lib/ctf/disabled
|
|
|
|
find /var/lib/kevin/tokens
|