mirror of
https://ceregatti.org/git/daniel/dayzdockerserver.git
synced 2025-05-06 14:21:18 +00:00

Login. Still WIP, but works. Install server files. Once logged in, this works. Add support for experimental in both web and scripts. WIP. Continuous streaming text web interface for long-running server processes. Large refactor of the config file. Use arrays instead of delimited strings. Large refactor of the express server to support the above. Add Steam API key to env for when we do mod searches. Customize the bash shell of the web container should we exec into it. Ignore the env file.
37 lines
631 B
Bash
Executable file
37 lines
631 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -eE
|
|
|
|
trap '
|
|
echo "Shutting down..."
|
|
' SIGINT SIGTERM
|
|
|
|
# Set PS1 so we know we're in the container
|
|
echo "Adding PS1 to .bashrc..."
|
|
cat > .bashrc <<EOF
|
|
alias ls='ls --color'
|
|
export PS1='${debian_chroot:+($debian_chroot)}\[\033[01;35m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
|
|
unset DEVELOPMENT
|
|
export PATH=${PATH}:/usr/local/dotnet
|
|
EOF
|
|
|
|
# Shut steamcmd up
|
|
if ! [ -d ${HOME}/.steam ]
|
|
then
|
|
mkdir -p ${HOME}/.steam
|
|
fi
|
|
|
|
cd /web
|
|
if [ -n "${STEAMAPIKEY}" ]
|
|
then
|
|
cat > env.json <<EOF
|
|
{
|
|
"STEAMAPIKEY": "${STEAMAPIKEY}"
|
|
}
|
|
EOF
|
|
else
|
|
echo "{}" > env.json
|
|
fi
|
|
#export DEBUG=express:*
|
|
npm run dev &
|
|
wait $!
|