Update docker file to better handle starting without an existing game folder
This commit is contained in:
parent
fdc4550e19
commit
a2e8b27ee4
3 changed files with 22 additions and 7 deletions
16
bin/unix/evennia-docker-start.sh
Normal file → Executable file
16
bin/unix/evennia-docker-start.sh
Normal file → Executable file
|
|
@ -1,10 +1,18 @@
|
|||
#! /bin/bash
|
||||
#! /bin/sh
|
||||
|
||||
# called by the Dockerfile to start the server in docker mode
|
||||
|
||||
# remove leftover .pid files (such as from when dropping the container)
|
||||
rm /usr/src/game/server/*.pid >& /dev/null || true
|
||||
|
||||
# start evennia server; log to server.log but also output to stdout so it can
|
||||
# be viewed with docker-compose logs
|
||||
exec 3>&1; evennia start -l
|
||||
PS1="evennia|docker \w $ "
|
||||
|
||||
cmd="$@"
|
||||
output="Docker starting with argument '$cmd' ..."
|
||||
if test -z $cmd; then
|
||||
cmd="bash"
|
||||
output="No argument given, starting shell ..."
|
||||
fi
|
||||
|
||||
echo $output
|
||||
exec 3>&1; $cmd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue