forked from github/server
update cron to check environment for switches
use server/bin instead of ~/bin
This commit is contained in:
parent
4efe6f6a71
commit
a3ebddeae4
|
@ -0,0 +1,10 @@
|
||||||
|
Freust Du Dich, dass es diese Woche wieder einen Eressea-Report gibt?
|
||||||
|
Möchtest Du dazu beitragen, dass das auch nächste Woche wieder passiert?
|
||||||
|
Eressea ist ein freiwilliges gratis-Angebot, und die Spielleitung bezahlt
|
||||||
|
seit Jahren die Entwicklung und das Hosting aus eigener Tasche. Wenn Dir
|
||||||
|
das etwas wert ist, kannst Du das auf
|
||||||
|
https://flattr.com/thing/681354/Eressea zum Ausdruck bringen.
|
||||||
|
|
||||||
|
Diese Mail enthält ein Attachment mit Deinem Eressea-Report in
|
||||||
|
komprimierter Form. Um ihn zu entpacken benötigst Du ein Programm,
|
||||||
|
das ZIP-Archive öffnen kann, wie z.B. 7-Zip (http://www.7-zip.org/)
|
|
@ -0,0 +1,6 @@
|
||||||
|
If you feel that getting a report every weekend is worth something to you,
|
||||||
|
why not flattr Eressea at https://flattr.com/thing/681354/Eressea ?
|
||||||
|
|
||||||
|
This email contains an Attachment with your Eressea report in compressed
|
||||||
|
form. To open the attachment, you will need a program that can extract
|
||||||
|
ZIP files, e.g. 7-Zip (http://www.7-zip.org/).
|
|
@ -0,0 +1,14 @@
|
||||||
|
Freust Du Dich, dass es diese Woche wieder einen Eressea-Report gibt?
|
||||||
|
Möchtest Du dazu beitragen, dass das auch nächste Woche wieder passiert?
|
||||||
|
Eressea ist ein freiwilliges gratis-Angebot, und die Spielleitung bezahlt
|
||||||
|
seit Jahren die Entwicklung und das Hosting aus eigener Tasche. Wenn Dir
|
||||||
|
das etwas wert ist, kannst Du das auf
|
||||||
|
https://flattr.com/thing/681354/Eressea zum Ausdruck bringen.
|
||||||
|
|
||||||
|
Diese Mail enthält ein Attachment mit Deinem Eressea-Report in
|
||||||
|
komprimierter Form. Um ihn zu entpacken benötigst Du ein Programm,
|
||||||
|
das ZIP-Archive öffnen kann, wie z.B. 7-Zip (http://www.7-zip.org/)
|
||||||
|
|
||||||
|
This email contains an attachment with your Eressea report in compressed
|
||||||
|
form. To open the attachment, you will need a program that can extract
|
||||||
|
ZIP files, e.g. 7-Zip (http://www.7-zip.org/).
|
|
@ -1,17 +0,0 @@
|
||||||
# Crontab for Eressea on gruenbaer.kn-bremen.de
|
|
||||||
|
|
||||||
PATH=/home/eressea/bin:/opt/bin:/usr/local/bin:/usr/bin:/bin
|
|
||||||
ERESSEA=/home/eressea/eressea
|
|
||||||
ENABLED=yes
|
|
||||||
PREVIEW=yes
|
|
||||||
CONFIRM=yes
|
|
||||||
|
|
||||||
# m h dom mon dow command
|
|
||||||
00 00 * * * $HOME/bin/fetchmail.cron
|
|
||||||
00 22 * * * $HOME/bin/backup-db.sh
|
|
||||||
|
|
||||||
15 21 * * Sat [ "$ENABLED" = "yes" ] && $ERESSEA/server/bin/run-eressea.cron 3
|
|
||||||
25 21 * * Sat [ "$ENABLED" = "yes" ] && $ERESSEA/server/bin/run-eressea.cron 4
|
|
||||||
35 21 * * Sat [ "$ENABLED" = "yes" ] && $ERESSEA/server/bin/run-eressea.cron 2
|
|
||||||
30 07 * * Sun [ "$PREVIEW" = "yes" ] && $ERESSEA/server/bin/preview.cron
|
|
||||||
*/5 * * * * [ "$CONFIRM" = "yes" ] && $ERESSEA/server/bin/orders.cron 2 3 4
|
|
|
@ -5,6 +5,10 @@
|
||||||
# this here script to make a non-blocking syntax check and reject or
|
# this here script to make a non-blocking syntax check and reject or
|
||||||
# accept the order file.
|
# accept the order file.
|
||||||
|
|
||||||
|
if [ "yes" != "$CONFIRM" ] ; then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
for GAME in $*
|
for GAME in $*
|
||||||
do
|
do
|
||||||
if [ "$GAME" == "eressea" ]; then GAME=2 ; fi
|
if [ "$GAME" == "eressea" ]; then GAME=2 ; fi
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
[ -z ${ERESSEA} ] && ERESSEA=~/eressea
|
[ "$PREVIEW" != "yes" ] && exit
|
||||||
|
[ -z ${ERESSEA} ] && ERESSEA=$HOME/eressea
|
||||||
|
|
||||||
branch="develop"
|
branch="develop"
|
||||||
if [ -e ${ERESSEA}/build/.preview ]; then
|
if [ -e ${ERESSEA}/build/.preview ]; then
|
||||||
branch=`cat ${ERESSEA}/build/.preview`
|
branch=`cat ${ERESSEA}/build/.preview`
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
GAME=$1
|
GAME=$1
|
||||||
BIN=$HOME/bin
|
|
||||||
export ERESSEA=$HOME/eressea
|
[ "$ENABLED" != "yes" ] && exit
|
||||||
|
[ -z ${ERESSEA} ] && ERESSEA=$HOME/eressea
|
||||||
|
|
||||||
|
export ERESSEA
|
||||||
|
BIN=$ERESSEA/server/bin
|
||||||
TURN=$(cat $ERESSEA/game-$GAME/turn)
|
TURN=$(cat $ERESSEA/game-$GAME/turn)
|
||||||
if [ ! -e $ERESSEA/game-$GAME/data/$TURN.dat ]; then
|
if [ ! -e $ERESSEA/game-$GAME/data/$TURN.dat ]; then
|
||||||
echo "data file $TURN is missing, cannot run turn for game $GAME"
|
echo "data file $TURN is missing, cannot run turn for game $GAME"
|
||||||
|
@ -14,6 +18,18 @@ fi
|
||||||
mkdir $REPORTS
|
mkdir $REPORTS
|
||||||
|
|
||||||
cd $ERESSEA/game-$GAME
|
cd $ERESSEA/game-$GAME
|
||||||
|
|
||||||
|
# wait for the queue lock to go away
|
||||||
|
maxt=5
|
||||||
|
to=5
|
||||||
|
while [ -e orders.queue.lock ] ; do
|
||||||
|
echo "waiting for orders to finish processing."
|
||||||
|
sleep $to
|
||||||
|
let to=$to+$to
|
||||||
|
let mast=$maxt-1
|
||||||
|
[ $maxt -lt 0 ] && break
|
||||||
|
done
|
||||||
|
|
||||||
if [ -d test ]; then
|
if [ -d test ]; then
|
||||||
touch test/execute.lock
|
touch test/execute.lock
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
## this script processes incoming order files.
|
|
||||||
# files are delivered into an incoming queue by procmail, then cron runs
|
|
||||||
# this here script to make a non-blocking syntax check and reject or
|
|
||||||
# accept the order file.
|
|
||||||
|
|
||||||
for GAME in $*
|
|
||||||
do
|
|
||||||
if [ "$GAME" == "eressea" ]; then GAME=2 ; fi
|
|
||||||
if [ "$GAME" == "e3a" ]; then GAME=3 ; fi
|
|
||||||
if [ -e $HOME/eressea/game-$GAME/orders.queue ]
|
|
||||||
then
|
|
||||||
$HOME/bin/orders-process $GAME
|
|
||||||
fi
|
|
||||||
done
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
GAME=$1
|
GAME=$1
|
||||||
TURN=$2
|
TURN=$2
|
||||||
|
|
||||||
|
@ -12,3 +14,4 @@ echo "running turn $TURN, game $GAME"
|
||||||
$ERESSEA/server/bin/eressea -v3 -t $TURN run-turn.lua
|
$ERESSEA/server/bin/eressea -v3 -t $TURN run-turn.lua
|
||||||
mkdir -p log
|
mkdir -p log
|
||||||
ln -f eressea.log log/eressea.log.$TURN
|
ln -f eressea.log log/eressea.log.$TURN
|
||||||
|
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
GAME=$1
|
|
||||||
TURN=$2
|
|
||||||
|
|
||||||
if [ ! -d $ERESSEA/game-$GAME ] ; then
|
|
||||||
echo "No such game: $GAME"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd $ERESSEA/game-$GAME
|
|
||||||
if [ -z $TURN ]; then
|
|
||||||
TURN=$(cat turn)
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "running turn $TURN, game $GAME"
|
|
||||||
if [ -d orders.dir.$TURN ]; then
|
|
||||||
echo "orders.dir.$TURN already exists"
|
|
||||||
else
|
|
||||||
mv orders.dir orders.dir.$TURN
|
|
||||||
mkdir -p orders.dir
|
|
||||||
fi
|
|
||||||
ls -1rt orders.dir.$TURN/turn-* | xargs cat > orders.$TURN
|
|
||||||
$ERESSEA/bin/eressea -t $TURN run-turn.lua
|
|
Loading…
Reference in New Issue