fix LUA_PATH for run-eressea.cron

This commit is contained in:
Enno Rehling 2021-03-06 21:29:36 +01:00
parent 7d434323a7
commit 87a08ad8ba
1 changed files with 2 additions and 2 deletions

View File

@ -1,13 +1,13 @@
#!/bin/bash #!/bin/bash
eval "$(luarocks path)"
export LUA_PATH="${ERESSEA}/server/scripts/?.lua;$LUA_PATH"
GAME=$1 GAME=$1
( (
[ "$ENABLED" == "no" ] && exit [ "$ENABLED" == "no" ] && exit
[ -z "$ERESSEA" ] && ERESSEA="$HOME/eressea" [ -z "$ERESSEA" ] && ERESSEA="$HOME/eressea"
export ERESSEA export ERESSEA
eval "$(luarocks path)"
export LUA_PATH="${ERESSEA}/server/scripts/?.lua;$LUA_PATH"
BIN="$ERESSEA/server/bin" 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