Update entrypoint-tmserver.sh

This commit is contained in:
ryluth 2019-09-27 11:07:14 +02:00 committed by GitHub
parent a9fb55153c
commit 5918aa3521
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -14,10 +14,12 @@ cd /opt/tmserver
# Evaluate all the available environment variables # Evaluate all the available environment variables
if [[ -z "${SERVER_LOGIN}" ]]; then if [[ -z "${SERVER_LOGIN}" ]]; then
echo "Server account login is missing. Server cannot start." echo "Server account login is missing. Server cannot start."
echo "Please set environment variable SERVER_LOGIN."
exit 9 exit 9
fi fi
if [[ -z "${SERVER_LOGIN_PASSWORD}" ]]; then if [[ -z "${SERVER_LOGIN_PASSWORD}" ]]; then
echo "Server account password is missing. Server cannot start." echo "Server account password is missing. Server cannot start."
echo "Please set environment variable SERVER_LOGIN_PASSWORD."
exit 9 exit 9
fi fi
if [[ -z "${SERVER_PORT}" ]]; then if [[ -z "${SERVER_PORT}" ]]; then
@ -33,12 +35,14 @@ if [[ -z "${SERVER_SA_PASSWORD}" ]]; then
echo "Might aswell leave it as randomly generated" echo "Might aswell leave it as randomly generated"
SERVER_SA_PASSWORD=$(pwgen -s 12) SERVER_SA_PASSWORD=$(pwgen -s 12)
echo "SuperAdmin password: ${SERVER_SA_PASSWORD}" echo "SuperAdmin password: ${SERVER_SA_PASSWORD}"
echo "Please write this down or pipe the docker logs to a file."
fi fi
if [[ -z "${SERVER_ADM_PASSWORD}" ]]; then if [[ -z "${SERVER_ADM_PASSWORD}" ]]; then
echo "No Admin password was set. Generating a random one. You can change it afterwards but it's also not that important" echo "No Admin password was set. Generating a random one. You can change it afterwards but it's also not that important"
echo "Might aswell leave it as randomly generated" echo "Might aswell leave it as randomly generated"
SERVER_ADM_PASSWORD=$(pwgen -s 12) SERVER_ADM_PASSWORD=$(pwgen -s 12)
echo "Admin password: ${SERVER_ADM_PASSWORD}" echo "Admin password: ${SERVER_ADM_PASSWORD}"
echo "Please write this down or pipe the docker logs to a file."
fi fi
if [[ -z "${SERVER_NAME}" ]]; then if [[ -z "${SERVER_NAME}" ]]; then
echo "No server name was set. Defaulting to 'Trackmania Server'" echo "No server name was set. Defaulting to 'Trackmania Server'"