Files
eressea-docker/docker-assets/run-eressea.cron.patch

28 lines
793 B
Diff

--- ../git.eressea/process/cron/run-eressea.cron 2021-04-18 14:51:46.000000000 +0200
+++ run-eressea.cron 2021-04-18 15:26:24.000000000 +0200
@@ -1,6 +1,11 @@
#!/bin/bash
+# this script is based on run-eressea.cron
+# differences to original
+# it is possible to run a turn with empty orders
+
GAME=$1
+ENABLE_EMPTY_ORDERS=$2
(
[ "$ENABLED" == "no" ] && exit
[ -z "$ERESSEA" ] && ERESSEA="$HOME/eressea"
@@ -28,8 +33,10 @@
"$BIN/create-orders" "$GAME" "$TURN"
if [ ! -s "$ERESSEA/game-$GAME/orders.$TURN" ]; then
- echo "server did not create orders for turn $TURN in game $GAME"
- exit 2
+ if [ "$ENABLE_EMPTY_ORDERS" != "yes" ]; then
+ echo "server did not create orders for turn $TURN in game $GAME"
+ exit 2
+ fi
fi
"$BIN/backup-eressea" "$GAME" "$TURN"