Skip to content

Commit

Permalink
Merge pull request #482 from cazfi/scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
cazfi authored Jun 28, 2022
2 parents e77089c + 920aa39 commit 583adba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ RUN DEBIAN_FRONTEND=noninteractive sudo apt-get update --yes --quiet && \
DEBIAN_FRONTEND=noninteractive sudo apt-get clean --yes && \
sudo rm --recursive --force /var/lib/apt/lists/*

## Give server access to savegames / scenarios directory.
## TODO: Figure out more targeted solution.
RUN sudo adduser docker tomcat

COPY docker-entrypoint.sh /docker/docker-entrypoint.sh

EXPOSE 80 8080 4002 6000 6001 6002 7000 7001 7002
Expand Down
9 changes: 5 additions & 4 deletions publite2/init-freeciv-web.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,16 @@ if [ "$5" = "longturn" ]; then
else
addArgs --quitidle 20
fi
addArgs --saves "${savesdir}"
addArgs --saves "${savesdir}" --scenarios "${savesdir}"

export FREECIV_SAVE_PATH=${savesdir};
export FREECIV_SAVE_PATH=${savesdir}
export FREECIV_SCENARIO_PATH=${savesdir}
rm -f "/var/lib/tomcat9/webapps/data/scorelogs/score-${2}.log"

python3 ../freeciv-proxy/freeciv-proxy.py "${3}" > "../logs/freeciv-proxy-${3}.log" 2>&1 &
proxy_pid=$! &&
${HOME}/freeciv/bin/freeciv-web "${args[@]}" > /dev/null 2> "../logs/freeciv-web-stderr-${2}.log"

rc=$?;
kill -9 $proxy_pid;
rc=$?;
kill -9 $proxy_pid;
exit $rc

0 comments on commit 583adba

Please sign in to comment.